summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yarns/000.yarn5
-rw-r--r--yarns/100-willikins.yarn9
-rw-r--r--yarns/900-implements.yarn17
-rwxr-xr-xyarns/run.sh4
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