summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/library.yarn13
1 files changed, 9 insertions, 4 deletions
diff --git a/testing/library.yarn b/testing/library.yarn
index b277777..0ee658d 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -160,14 +160,19 @@ Admin repo manipulation
TOKEN=$($GTT runcommand $MATCH_1 $MATCH_2 user del $MATCH_3 2>&1 | $GTT findtoken)
$GTT runcommand $MATCH_1 $MATCH_2 user del $MATCH_3 $TOKEN
- IMPLEMENTS GIVEN ([a-z][a-z0-9]*),? using ([a-z][a-z0-9]*),? has patched gitano-admin with ([^ ]+)
+ IMPLEMENTS GIVEN ([a-z][a-z0-9]*),? using ([a-z][a-z0-9]*),? has patched gitano-admin with (the reverse of )?([^ ]+)
$GTT clone $MATCH_1 $MATCH_2 gitano-admin.git tmp-adminpatch \
>$DATADIR/stdout 2>$DATADIR/stderr
- $GTT rungit $MATCH_1 tmp-adminpatch apply -v --cached - <"testing/admin-patches/$MATCH_3" \
- >>$DATADIR/stdout 2>>$DATADIR/stderr
+ if test "$MATCH_3" = ""; then
+ $GTT rungit $MATCH_1 tmp-adminpatch apply -v --cached - <"testing/admin-patches/$MATCH_4" \
+ >>$DATADIR/stdout 2>>$DATADIR/stderr
+ else
+ $GTT rungit $MATCH_1 tmp-adminpatch apply -v --cached --reverse - <"testing/admin-patches/$MATCH_4" \
+ >>$DATADIR/stdout 2>>$DATADIR/stderr
+ fi
$GTT rungit $MATCH_1 tmp-adminpatch diff --cached \
>>$DATADIR/stdout 2>>$DATADIR/stderr
- $GTT rungit $MATCH_1 tmp-adminpatch commit --allow-empty -m "Apply $MATCH_3 rules change" \
+ $GTT rungit $MATCH_1 tmp-adminpatch commit --allow-empty -m "Apply $MATCH_4 rules change" \
>>$DATADIR/stdout 2>>$DATADIR/stderr
$GTT rungit $MATCH_1 tmp-adminpatch show HEAD \
>>$DATADIR/stdout 2>>$DATADIR/stderr