diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-07-24 23:44:51 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-07-24 23:44:51 +0300 |
commit | 9c32d15124dd64e333f924eed8a9fc50b20dd6e9 (patch) | |
tree | 880be60bb4bd46deceb4dcbc1a823d02e9d75bd2 /yarns | |
parent | 899f84526cdbf320c38eca88ab47f2cbe9d50606 (diff) | |
download | ansibleness-9c32d15124dd64e333f924eed8a9fc50b20dd6e9.tar.gz |
Add beginnings of yarn tests for willikins
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/000.yarn | 5 | ||||
-rw-r--r-- | yarns/100-willikins.yarn | 9 | ||||
-rw-r--r-- | yarns/900-implements.yarn | 17 | ||||
-rwxr-xr-x | yarns/run.sh | 4 |
4 files changed, 35 insertions, 0 deletions
diff --git a/yarns/000.yarn b/yarns/000.yarn new file mode 100644 index 0000000..5a1bbf0 --- /dev/null +++ b/yarns/000.yarn @@ -0,0 +1,5 @@ +--- +title: System test suite +author: Lars Wirzenius (liw@liw.fi) +date: GIT VERSION +... diff --git a/yarns/100-willikins.yarn b/yarns/100-willikins.yarn new file mode 100644 index 0000000..8f20cdc --- /dev/null +++ b/yarns/100-willikins.yarn @@ -0,0 +1,9 @@ +# The willikins system: home backup server + +Our home backup server is a dedicates file server just for storing +backups. It is only ever accessed over ssh (including sftp). + + SCENARIO willikins backup server + GIVEN server name is willikins + THEN server responds to ping + diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn new file mode 100644 index 0000000..5b9d0f9 --- /dev/null +++ b/yarns/900-implements.yarn @@ -0,0 +1,17 @@ +# Appendix: Scenario step implementations + +## Configuration + +Save the name of the server to be tested, so it doesn't need to be +repeated for every step. + + IMPLEMENTS GIVEN server name is (.+) + echo "SERVER=$MATCH_1" >> "$DATADIR/config.sh" + +## Ping + +Does the server respond to a ping? + + IMPLEMENTS THEN server responds to ping + . "$DATADIR/config.sh" + ping -c1 "$SERVER" diff --git a/yarns/run.sh b/yarns/run.sh new file mode 100755 index 0000000..4f7f7af --- /dev/null +++ b/yarns/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd "$(dirname "$0")" +yarn *.yarn |