From 9c32d15124dd64e333f924eed8a9fc50b20dd6e9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 24 Jul 2015 23:44:51 +0300 Subject: Add beginnings of yarn tests for willikins --- yarns/000.yarn | 5 +++++ yarns/100-willikins.yarn | 9 +++++++++ yarns/900-implements.yarn | 17 +++++++++++++++++ yarns/run.sh | 4 ++++ 4 files changed, 35 insertions(+) create mode 100644 yarns/000.yarn create mode 100644 yarns/100-willikins.yarn create mode 100644 yarns/900-implements.yarn create mode 100755 yarns/run.sh (limited to 'yarns') 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 -- cgit v1.2.1