From 4bae8d8b01bbbc816f202d79e50135bf0bf26d5d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 27 Mar 2014 20:47:02 +0000 Subject: Convert unreadable-dir cmdtest to yarn --- yarns/0030-basics.yarn | 15 +++++++++++++++ yarns/9000-implements.yarn | 5 +++++ 2 files changed, 20 insertions(+) (limited to 'yarns') diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn index 0a04c98b..22ca0f1d 100644 --- a/yarns/0030-basics.yarn +++ b/yarns/0030-basics.yarn @@ -141,6 +141,21 @@ Create some live data, and a file that is unreadable. AND file L/unreadable-file with permissions 000 WHEN user U attempts to back up directory L to repository R THEN the error message matches "RCE08AX.*L/unreadable-file" + WHEN user U attempts to verify L against repository R + THEN the attempt succeeded + +Next, let's do the same thing again, but with an unreadable directory +instead of a file. + + SCENARIO unreadable live data directory + ASSUMING not running as root + GIVEN 1k of new data in directory L + AND directory L/unreadable-dir with permissions 000 + WHEN user U attempts to back up directory L to repository R + THEN the error message matches "RD5FA4X.*L/unreadable-dir" + WHEN user U attempts to verify L against repository R + THEN the attempt succeeded + Backup to roots at once ----------------------- diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 26716143..f2dab5f4 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -93,6 +93,11 @@ Create a file with given permissions. touch "$DATADIR/$MATCH_1" chmod "$MATCH_2" "$DATADIR/$MATCH_1" +Create a directory with given permissions. + + IMPLEMENTS GIVEN directory (\S+) with permissions (\S+) + install -d -m "$MATCH_2" "$DATADIR/$MATCH_1" + We need to manipulate extended attributes. IMPLEMENTS GIVEN file (\S+) has extended attribute (\S+) set to (\S+) -- cgit v1.2.1