diff options
Diffstat (limited to 'tests/tests')
-rwxr-xr-x | tests/tests/clone-skew | 35 | ||||
-rwxr-xr-x | tests/tests/debpolicy-newreject | 10 | ||||
-rwxr-xr-x | tests/tests/debpolicy-taintrm | 3 | ||||
-rwxr-xr-x | tests/tests/gdr-edits | 3 | ||||
-rwxr-xr-x | tests/tests/mirror | 4 | ||||
-rwxr-xr-x | tests/tests/push-newrepeat | 2 | ||||
-rwxr-xr-x | tests/tests/quilt-singlepatch | 2 | ||||
-rwxr-xr-x | tests/tests/trustingpolicy-replay | 2 |
8 files changed, 52 insertions, 9 deletions
diff --git a/tests/tests/clone-skew b/tests/tests/clone-skew new file mode 100755 index 0000000..dd51acd --- /dev/null +++ b/tests/tests/clone-skew @@ -0,0 +1,35 @@ +#!/bin/bash +set -e +. tests/lib + +t-dependencies libhttp-server-simple-static-perl + +$troot/http-static-server >$tmp/must-clean/mirror.port $tmp/mirror +read <$tmp/must-clean/mirror.port mirror_port + +t-git-config --global dgit-distro.test-dummy.mirror \ + http://127.0.0.1:$mirror_port/ + +t_archive_ln_s=cp + +t-archive example 1.0-1 +t-git-none + +perl -i -ne ' + print or die $!; + s/1.0-1/1.0-1+0.1/g; + s/ \w/ sprintf " %x", $& ^ 1 /e; + print or die $!; +' $tmp/aq/package.sid.$p +t-aq-archive-updated sid $p + +LC_MESSAGES=C \ +t-dgit clone $p 2>&1 |tee got.message + +grep 'Warning: archive skew detected.' got.message +egrep 'We were able to obtain only *1.0-1$' got.message + +cd $p +t-cloned-fetched-good + +t-ok diff --git a/tests/tests/debpolicy-newreject b/tests/tests/debpolicy-newreject index 1fa6751..af02ac1 100755 --- a/tests/tests/debpolicy-newreject +++ b/tests/tests/debpolicy-newreject @@ -57,7 +57,8 @@ t-git-dir-check enoent vanished=$v -t-dgit push --new --deliberately-include-questionable-history +t-dgit push --new --deliberately-include-questionable-history \ + --force-reusing-version t-git-dir-check secret t-policy-periodic @@ -81,7 +82,7 @@ t-expect-push-fail \ "Package is in NEW and has not been accepted or rejected yet" \ t-dgit --deliberately-TEST-dgit-only-not-fast-forward push -t-dgit --deliberately-not-fast-forward push +t-dgit --deliberately-not-fast-forward --force-reusing-version push cd $dgitrepo t-expect-push-fail "Not a valid object name" \ @@ -94,7 +95,8 @@ t-expect-push-fail \ "Package is in NEW and has not been accepted or rejected yet" \ t-dgit push -t-dgit push --deliberately-include-questionable-history +t-dgit push --deliberately-include-questionable-history \ + --force-reusing-version t-archive-process-incoming sid @@ -116,6 +118,6 @@ t-dgit pull t-dgit build t-expect-push-fail \ 'Reason: rewound suite sid; --deliberately-not-fast-forward specified' \ -t-dgit push +t-dgit --force-reusing-version push t-ok diff --git a/tests/tests/debpolicy-taintrm b/tests/tests/debpolicy-taintrm index 8655fb5..a9e54da 100755 --- a/tests/tests/debpolicy-taintrm +++ b/tests/tests/debpolicy-taintrm @@ -35,7 +35,8 @@ t-expect-push-fail \ 'all previously pushed versions were found to have been removed from NEW' \ t-dgit push-source --new -t-dgit push-source --new --deliberately-include-questionable-history +t-dgit push-source --new --deliberately-include-questionable-history \ + --force-reusing-version t-archive-process-incoming new diff --git a/tests/tests/gdr-edits b/tests/tests/gdr-edits index 0bdf15f..a8b519c 100755 --- a/tests/tests/gdr-edits +++ b/tests/tests/gdr-edits @@ -27,6 +27,9 @@ t-gdr-good laundered t-dgit push-source t-gdr-good pushed-interop +t-expect-fail E:'add a new changelog stanza.*and try again' \ +t-dgit push-source + git branch before-noop t-git-next-date diff --git a/tests/tests/mirror b/tests/tests/mirror index 4947688..4aa756b 100755 --- a/tests/tests/mirror +++ b/tests/tests/mirror @@ -31,7 +31,9 @@ set -ex : $sentinel cat >&2 $sentinel shift # eat HOST -sh -c "\$*" +export SSH_ORIGINAL_COMMAND="\$*" +exec \${DGIT_MIRROR_SSH_WRAP_TEST-dgit-mirror-ssh-wrap} \ + '$tmp/git-mirror/' .git -- END chmod +x $tmp/stunt-ssh diff --git a/tests/tests/push-newrepeat b/tests/tests/push-newrepeat index 87fcb35..048dfd2 100755 --- a/tests/tests/push-newrepeat +++ b/tests/tests/push-newrepeat @@ -16,6 +16,6 @@ t-expect-fail E:'Push failed, while updating the remote git repository' \ t-dgit -cdgit-distro.test-dummy.git-url=file:///dev/enoent/fail \ push --new -t-dgit push --new +t-dgit push --new --force-reusing-version t-ok diff --git a/tests/tests/quilt-singlepatch b/tests/tests/quilt-singlepatch index 320a31c..9c03595 100755 --- a/tests/tests/quilt-singlepatch +++ b/tests/tests/quilt-singlepatch @@ -40,6 +40,6 @@ git apply --reverse debian/patches/debian-changes git commit -a -m 'go back to plain upstream' t-dgit -wgf build-source -t-dgit --damp-run push +t-dgit --damp-run --force-reusing-version push t-ok diff --git a/tests/tests/trustingpolicy-replay b/tests/tests/trustingpolicy-replay index 2a1012b..a2d280d 100755 --- a/tests/tests/trustingpolicy-replay +++ b/tests/tests/trustingpolicy-replay @@ -27,7 +27,7 @@ t-dgit push git checkout $tagpfx/1.0 t-dgit build -t-dgit push --deliberately-fresh-repo +t-dgit push --deliberately-fresh-repo --force-reusing-version remote="`git config dgit-distro.test-dummy.git-url`/$p.git" |