summaryrefslogtreecommitdiff
path: root/yarns/implementations.yarn
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-05-23 16:28:21 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-06-11 12:49:25 +0000
commita927ab8a22c5bf9c7365868cccba6737540bc522 (patch)
tree77dbc93e26068a29c8fdfa19ff52aead9a675614 /yarns/implementations.yarn
parent126d9ab69c12edec9509cb25bcc5e4b7c2e98f1f (diff)
downloadmorph-baserock/adamcoldrick/deploy-specific-systems-v4.tar.gz
Add yarn tests for new deployment functionalitybaserock/adamcoldrick/deploy-specific-systems-v4
Diffstat (limited to 'yarns/implementations.yarn')
-rw-r--r--yarns/implementations.yarn13
1 files changed, 13 insertions, 0 deletions
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"