X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Ftests%2Fdownstream-gitless;h=6b2df1bd3e2578bf6565cbe1308d87093c541074;hb=019f49c1c81145e61b1e066efe937e93e64fee7d;hp=b7f1c608efcf449cf951cc46bd617218ec09654e;hpb=b77d2fd90d945d937ed3983d139d207ab4e1913e;p=dgit.git diff --git a/tests/tests/downstream-gitless b/tests/tests/downstream-gitless index b7f1c608..6b2df1bd 100755 --- a/tests/tests/downstream-gitless +++ b/tests/tests/downstream-gitless @@ -3,6 +3,7 @@ set -e . tests/lib . $troot/lib-reprepro +t-dependencies reprepro t-setup-import examplegit t-tstunt-parsechangelog @@ -73,6 +74,18 @@ t-git-config dgit-distro.downstream.git-check false t-dgit clone example avon example.avon +perl -i -pe 's/ test-dummy / unknown-distro / if m/^Dgit:/' $dscf +cd $p.import + +t-expect-fail 'hinted url with protocol file which is unsafe' \ +t-dgit import-dsc $dscf xunk + +t-git-config dgit.dsc-url-proto-ok.file true +t-dgit import-dsc $dscf xunk + +cd .. + + dscf=$tmp/mirror/pool/main/example_2.1.dsc t-reprepro-includedsc avon $dscf ds- t-reprepro-regen ds- @@ -87,7 +100,12 @@ git init t-dgit import-dsc $dscf +x t-ref-same refs/heads/x git show x | grep Spong -cd .. +t-expect-fail 'Your git tree does not have that object' \ +t-dgit --no-chase-dsc-distro import-dsc $dscf +y + +cd ../$p +t-dgit --no-chase-dsc-distro import-dsc $dscf +y +git show y | grep Sid -#t-ok +t-ok