From a927ab8a22c5bf9c7365868cccba6737540bc522 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Fri, 23 May 2014 16:28:21 +0000 Subject: Add yarn tests for new deployment functionality --- yarns/implementations.yarn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'yarns/implementations.yarn') diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 66d47bfd..651c0748 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -657,6 +657,16 @@ them, so they can be added to the end of the implements section. if [ $MATCH_1 == "deploys" ]; then run_morph "$@" else attempt_morph "$@"; fi + IMPLEMENTS WHEN the user (attempts to deploy|deploys) the following systems from cluster (\S+) in branch (\S+): (.*) + cd "$DATADIR/workspace/$MATCH_3" + set -- deploy "$MATCH_2" + if [ "$MATCH_4" != '' ]; then + # eval used so word splitting in the text is preserved + eval set -- '"$@"' $MATCH_4 + fi + if [ $MATCH_1 == "deploys" ]; then run_morph "$@" + else attempt_morph "$@"; fi + IMPLEMENTS WHEN the user (attempts to upgrade|upgrades) the (system|cluster) (\S+) in branch (\S+)( with options (.*))? cd "$DATADIR/workspace/$MATCH_4" set -- deploy --upgrade "$MATCH_3" @@ -712,6 +722,9 @@ Check attributes of a file on the filesystem IMPLEMENTS THEN file (\S+) exists test -e "$DATADIR/$MATCH_1" + IMPLEMENTS THEN file (\S+) does not exist + test ! -e "$DATADIR/$MATCH_1" + IMPLEMENTS THEN file (\S+) has permissions (\S+) stat -c %A "$DATADIR/$MATCH_1" | grep -Fx -e "$MATCH_2" -- cgit v1.2.1