summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2017-02-13 12:22:21 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2017-02-13 12:22:21 +0000
commit7bc95a0f3ebc3732b134c33baef0d9844619b4c2 (patch)
treeaf036eb8dd32fdc689b4faf90e4ef6ef14fbdf16 /testing
parent5ab106a7e6a3b4d0ff46bab75524553455c2485e (diff)
downloadgitano-7bc95a0f3ebc3732b134c33baef0d9844619b4c2.tar.gz
supports reversing admin patches
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