chiark / gitweb /
test suite: gdr-subcommands: Drop obsolete line
[dgit.git] / tests / tests / downstream-gitless
index 4b72470aade6d44e00cf1d2724e7c5616a8fcd0d..6b2df1bd3e2578bf6565cbe1308d87093c541074 100755 (executable)
@@ -3,6 +3,7 @@ set -e
 . tests/lib
 . $troot/lib-reprepro
 
+t-dependencies reprepro
 t-setup-import examplegit
 t-tstunt-parsechangelog
 
@@ -35,7 +36,9 @@ filter () {
 cd $p
 filter                         \
   refs/heads/master            \
-  refs/remotes/dgit/dgit/sid   \
+  refs/remotes/dgit/dgit/sid
+
+t-ref-head
 
 cd ../git/$p.git
 filter                         \
@@ -51,21 +54,58 @@ cd ..
 suitespecs=avon
 t-reprepro-cfg ds- downstream
 t-reprepro-setup ds-
+distro=''
 
-t-reprepro-includedsc avon $tmp/mirror/pool/main/example_1.1.dsc ds-
 
+dscf=$tmp/mirror/pool/main/example_1.1.dsc
+t-reprepro-includedsc avon $dscf ds-
 t-reprepro-regen ds-
 
-distro=''
+
+mkdir $p.import
+cd $p.import
+git init
+t-dgit import-dsc $dscf x
+cd ..
 
 t-git-config dgit-suite.avon.distro downstream
 t-git-config dgit-distro.downstream.git-check false
 
 t-dgit clone example avon example.avon
 
-t-reprepro-includedsc avon $tmp/mirror/pool/main/example_2.1.dsc ds-
+
+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-
+
 
 cd $p.avon
 t-dgit fetch
+t-ref-same refs/remotes/dgit/dgit/avon
+
+cd ../$p.import
+git init
+t-dgit import-dsc $dscf +x
+t-ref-same refs/heads/x
+git show x | grep Spong
+
+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