From cde6831504c83769199462126ed635bd5177d821 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 24 Jul 2015 23:54:12 +0300 Subject: Add step for checking hostname --- yarns/100-willikins.yarn | 4 +--- yarns/900-implements.yarn | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'yarns') diff --git a/yarns/100-willikins.yarn b/yarns/100-willikins.yarn index d12e45e..1ea8f24 100644 --- a/yarns/100-willikins.yarn +++ b/yarns/100-willikins.yarn @@ -6,6 +6,4 @@ backups. It is only ever accessed over ssh (including sftp). SCENARIO willikins backup server GIVEN server name is willikins THEN server responds to ping - - WHEN running ssh willikins hostname - THEN output matches willikins + AND server hostname is as expected diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index d4b1ee5..2ffee04 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -16,6 +16,14 @@ Does the server respond to a ping? . "$DATADIR/config.sh" ping -c1 "$SERVER" +## Check server hostname + +Does the server's hostname match its domain name? + + IMPLEMENTS THEN server hostname is as expected + . "$DATADIR/config.sh" + ssh "$SERVER" hostname | grep -Fx "$SERVER" + ## Running command over ssh Run a command on the server over ssh, capturing stdout and stderr and -- cgit v1.2.1