X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftests%2Fimport-dsc;h=bdd849ca1060e75d8fcff9aac988d5ea94b7a4a0;hp=9d3d9b79136e612de512c79e9d5ff8c0ae693c8b;hb=f7e37ea9f83b46c5efa4152b36c6cc0f4b91fadd;hpb=7d8adc6e0fbb6b2d57b2c57ba8f036d1face54a1 diff --git a/tests/tests/import-dsc b/tests/tests/import-dsc index 9d3d9b79..bdd849ca 100755 --- a/tests/tests/import-dsc +++ b/tests/tests/import-dsc @@ -1,6 +1,7 @@ #!/bin/bash set -e . tests/lib +t-tstunt-parsechangelog t-setup-import examplegit @@ -69,15 +70,37 @@ cd $p.2 git init -check-import ../../../pkg-srcs 1.0-1 +check-import $troot/pkg-srcs 1.0-1 + +cd .. +v=1.0-1+absurd +rm -f ${p}_* +dsc=$troot/pkg-srcs/${p}_${v}.dsc +cd $p.2 + +cp $dsc .. +t-expect-fail 'it does not exist' \ +check-import .. $v + +mkdir ../enoents +cp $dsc ../enoents +t-expect-fail 'No such file or directory' \ +check-import ../enoents $v + +cd .. +rm -f ${p}_${v}.dsc +dget -du file://$dsc +cd $p.2 + +check-import .. $v t-expect-fail "Your git tree does not have that object" \ -check-import ../mirror/pool/main 1.2 +check-import ../mirror/pool/main 1.2 --no-chase-dsc-distro check-import ../mirror/pool/main 1.2 --force-import-dsc-with-dgit-field v=1.0-1.100 -dsc2=../../../pkg-srcs/${p}_${v}.dsc +dsc2=$troot/pkg-srcs/${p}_${v}.dsc t-expect-fail E:'Branch.*already exists' \ t-dgit import-dsc $dsc2 $branch @@ -96,4 +119,4 @@ test "x$mb" = x t-expect-fail 'signature check failed' \ t-dgit import-dsc --require-valid-signature $dsc2 +$branch -echo ok. +t-ok