From c8fe30533c4d00f31bfdce80e37c964d4325bbb9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 25 Jul 2015 10:05:43 +0300 Subject: Check that willikins works with sftp --- yarns/100-willikins.yarn | 1 + yarns/900-implements.yarn | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'yarns') diff --git a/yarns/100-willikins.yarn b/yarns/100-willikins.yarn index 697897b..3360925 100644 --- a/yarns/100-willikins.yarn +++ b/yarns/100-willikins.yarn @@ -10,3 +10,4 @@ backups. It is only ever accessed over ssh (including sftp). AND server hostname is as expected AND server account has sudo AND server has python version 2 installed + AND server allows SFTP diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index f08baee..57f52aa 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -61,6 +61,21 @@ exit code for later inspection. echo $? > "$DATADIR/exit" fi +## Access server over SFTP + +Put and get a file over SFTP. + + IMPLEMENTS THEN server allows SFTP + . "$DATADIR/config.sh" + echo test.file > "$DATADIR/sftp.file" + cat > "$DATADIR/sftp.commands" << EOF + put $DATADIR/sftp.file sftp.file + get sftp.file $DATADIR/sftp.file.copy + rm sftp.file + EOF + sftp -b "$DATADIR/sftp.commands" "$ACCOUNT@$SERVER" + cmp "$DATADIR/sftp.file" "$DATADIR/sftp.file.copy" + ## Inspect results of running a command The stdout, stderr, and exit code have been saved. Inspect them. -- cgit v1.2.1