diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-12-28 19:28:52 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2022-12-28 20:08:38 +0000 |
commit | 5d7ae107d64aa12587926067bfbea1b02251c31c (patch) | |
tree | 442e969f1cec1b3abbc9e403a0e4709a6653c2de /tests/lib | |
parent | 3e7cd04f77b979446722f77671b6628c09d6489c (diff) |
tainted-objects (cleanup): Improve t-expect-push-fail-tainted
Make it take one string, and expect the same message both locally and
when printed by the remote.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -181,13 +181,14 @@ t-expect-push-fail-retriably () { } t-expect-push-fail-tainted () { - # t-expect-push-fail-local-and-remote $mlocal $mremote $push_args... - # Messages are implicitly prefixed with 'E:^' + # t-expect-push-fail-local-and-remote $m $push_args... + # Message is implicitly prefixed with 'E:^' # to avoid spotting them in protocol debug output etc. - local ml="$1"; local mr="$2"; shift; shift + # Same message is expected from the remote. + local m="$1"; shift - t-expect-push-fail-retriably E:"^$ml" "$@" - t-expect-push-fail E:"^$mr" "$@" --force-push-tainted + t-expect-push-fail-retriably "E:^$m" "$@" + t-expect-push-fail "E:^remote: $m" "$@" --force-push-tainted } t-git-objects-not-present () { |