diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-12-28 18:50:23 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-12-28 20:08:38 +0000 |
commit | e2fac09cb67846609e39148296f7525ccaed2d2f (patch) | |
tree | 3ce43a354d252c44857be8b9c4c93eceb6c9e56d /tests | |
parent | 10cea92a44507beb00ccceae631cdde0b0145f40 (diff) |
tainted-objects (cleanup): Move t-expect-push-fail-tainted to lib
And rename it.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib | 10 | ||||
-rwxr-xr-x | tests/tests/debpolicy-taintrm | 15 |
2 files changed, 13 insertions, 12 deletions
@@ -180,6 +180,16 @@ t-expect-push-fail-retriably () { $tmp/t.push-output } +t-expect-push-fail-tainted () { + # t-expect-push-fail-local-and-remote $mlocal $mremote $push_args... + # Messages are implicitly prefixed with 'E:^' + # to avoid spotting them in protocol debug output etc. + local ml="$1"; local mr="$2"; shift; shift + + t-expect-push-fail-retriably E:"^$ml" "$@" + t-expect-push-fail E:"^$mr" "$@" --force-push-tainted +} + t-git-objects-not-present () { # t-git-objects-not-present GITDIR|'' OBJID [...] # specifying '' means the repo for package $p diff --git a/tests/tests/debpolicy-taintrm b/tests/tests/debpolicy-taintrm index 9344e4d..cab79ea 100755 --- a/tests/tests/debpolicy-taintrm +++ b/tests/tests/debpolicy-taintrm @@ -4,15 +4,6 @@ set -e t-tstunt-parsechangelog -t-expect-push-fail-local-and-remote () { - # t-expect-push-fail-local-and-remote $mlocal $mremote $push_args... - # Messages are implicitly prefixed with 'E:^' - # to avoid spotting them in protocol debug output etc. - local ml="$1"; local mr="$2"; shift; shift - t-expect-push-fail-retriably E:"^$ml" "$@" - t-expect-push-fail E:"^$mr" "$@" --force-push-tainted -} - t-debpolicy t-prep-newpackage example 1.0 @@ -28,7 +19,7 @@ t-dgit push-source --new t-commit 'edit after first push' -t-expect-push-fail-local-and-remote \ +t-expect-push-fail-tainted \ 'Package is in NEW and has not been accepted or rejected yet' \ 'remote: Package is in NEW and has not been accepted or rejected yet' \ t-dgit push-source --new @@ -47,12 +38,12 @@ t-commit 'edit after cut' : push, needs --deliberately -t-expect-push-fail-local-and-remote \ +t-expect-push-fail-tainted \ ' overrideable .* all previously pushed versions were found to have been removed from NEW' \ 'remote: .* all previously pushed versions were found to have been removed from NEW' \ t-dgit push-source --new -t-expect-push-fail-local-and-remote \ +t-expect-push-fail-tainted \ ' overrideable .* all previously pushed versions were found to have been removed from NEW' \ 'remote: .* all previously pushed versions were found to have been removed from NEW' \ t-dgit push-source --new --deliberately-not-fast-forward \ |