summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 18:50:23 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 20:08:38 +0000
commite2fac09cb67846609e39148296f7525ccaed2d2f (patch)
tree3ce43a354d252c44857be8b9c4c93eceb6c9e56d /tests/lib
parent10cea92a44507beb00ccceae631cdde0b0145f40 (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/lib')
-rw-r--r--tests/lib10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib b/tests/lib
index 2f8d09c..cb061a7 100644
--- a/tests/lib
+++ b/tests/lib
@@ -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