diff options
Diffstat (limited to 'tests/tests/debpolicy-newreject')
-rwxr-xr-x | tests/tests/debpolicy-newreject | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/tests/tests/debpolicy-newreject b/tests/tests/debpolicy-newreject index 61f7951..05a0a4f 100755 --- a/tests/tests/debpolicy-newreject +++ b/tests/tests/debpolicy-newreject @@ -27,7 +27,8 @@ t-git-objects-not-present "" $bad ' t-dgit build -t-expect-push-fail 'forbidden for testing' \ +t-expect-push-fail-tainted \ + 'Reason: forbidden for testing' \ t-dgit push --new t-git-dir-check enoent @@ -53,7 +54,8 @@ t-git-dir-check enoent t-commit 'should require --deliberately...questionable' t-dgit build -t-expect-push-fail E:"tag $tagpfx/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \ +t-expect-push-fail-tainted \ + "Reason: tag $tagpfx/${vanished//./\\.} referred to this object.*all previously pushed versions were found to have been removed" \ t-dgit push --new t-git-dir-check enoent @@ -77,11 +79,15 @@ git reset --hard start t-commit 'should require --deliberately..not-ff' t-dgit build -t-expect-push-fail "HEAD is not a descendant of the archive's version" \ +# Rewound, without passing the option +t-expect-push-fail-retriably \ + E:"^dgit: error: .* HEAD is not a descendant of the archive's version" \ t-dgit push +# Rewound, passing stunt option to defeat local checks +# so we check that remote check is effective. t-expect-push-fail \ - "Package is in NEW and has not been accepted or rejected yet" \ + E:"^remote: 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 --force-reusing-version push @@ -93,13 +99,12 @@ cd $tmp/$p t-commit 'Still not accepted, will override taint' t-dgit build -t-expect-push-fail \ +t-expect-push-fail-tainted \ "Package is in NEW and has not been accepted or rejected yet" \ t-dgit push t-dgit push --deliberately-include-questionable-history \ - --force-reusing-version --force-push-tainted -# TODO remove --force-push-tainted and test both local and remote reject + --force-reusing-version t-archive-process-incoming sid @@ -110,19 +115,23 @@ t-dgit push git checkout -b stoats $tagpfx/$vanished t-commit 'Simulate accidentally building on rejected version' t-dgit build -t-expect-push-fail "HEAD is not a descendant of the archive's version" \ +t-expect-push-fail \ + E:"^dgit: error:.* HEAD is not a descendant of the archive's version" \ t-dgit push : "check that uploader can't force it now" -t-expect-push-fail "not fast forward on dgit branch" \ -t-dgit --deliberately-not-fast-forward push --force-push-tainted -# TODO remove --force-push-tainted and test both local and remote reject +t-expect-push-fail \ + E:"^remote: .*: reject: not fast forward on dgit branch" \ +t-dgit --deliberately-not-fast-forward push \ + --deliberately-include-questionable-history \ + --force-push-tainted +# Ideally ^ this would be detected locally first, in which case we would +# use t-expect-push-fail-tainted or something like it. But it isn't. t-dgit pull t-dgit build -t-expect-push-fail \ +t-expect-push-fail-tainted \ 'Reason: rewound suite sid; --deliberately-not-fast-forward specified' \ -t-dgit --force-reusing-version push --force-push-tainted -# TODO remove --force-push-tainted and test both local and remote reject +t-dgit --force-reusing-version push t-ok |