summaryrefslogtreecommitdiff
path: root/testing/library.yarn
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2016-11-05 15:01:37 +0000
committerRichard Maw <richard.maw@gmail.com>2016-11-05 15:03:36 +0000
commitce7defb7534e3f17853b369db6b1225cbd9cf7f9 (patch)
treea1bf02b5883ea3da508782331f92a6e58d95906d /testing/library.yarn
parent232850b9035ce258f747f97694f0cf68648ec54e (diff)
downloadgitano-ce7defb7534e3f17853b369db6b1225cbd9cf7f9.tar.gz
testing: Check delete token expiry
Diffstat (limited to 'testing/library.yarn')
-rw-r--r--testing/library.yarn11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/library.yarn b/testing/library.yarn
index 6d30db0..4754d39 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -40,6 +40,13 @@ Repository access
IMPLEMENTS WHEN ([a-z][a-z0-9]*),? using ([a-z][a-z0-9]*),? pushes ([^ ]+) to ([^ ]+)
$GTT pushviassh $MATCH_1 $MATCH_2 "$MATCH_3" "$MATCH_4"
+ IMPLEMENTS WHEN ([a-z][a-z0-9]*),? using ([a-z][a-z0-9]*),? (expecting failure,? )?destroys ([^ ]+) using the (.+) token
+ if $GTT runcommand $MATCH_1 $MATCH_2 \
+ destroy $MATCH_4 "$(cat "$DATADIR/saved-tokens/$MATCH_5")" \
+ >$DATADIR/stdout 2>$DATADIR/stderr; then
+ test "$MATCH_3" = ""
+ fi
+
Server-side repository checking for behind-the-scenes work
----------------------------------------------------------
@@ -147,6 +154,10 @@ Generic utility methods
IMPLEMENTS THEN ([^ ]+) is empty
if grep -q . $DATADIR/"$MATCH_1"; then false; fi
+ IMPLEMENTS GIVEN the token is saved as (.+)
+ mkdir -p "$DATADIR/saved-tokens"
+ cat "$DATADIR/stdout" "$DATADIR/stderr" | $GTT findtoken >"$DATADIR/saved-tokens/$MATCH_1"
+
IMPLEMENTS THEN failure ensues
cd $DATADIR
echo "FIND:"