diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-04-11 18:56:16 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-04-11 18:56:16 +0100 |
commit | c09778fe5c1fbca31b7dd4cb1a4533fb95e95e06 (patch) | |
tree | 3181069468da25c95ada89d204668eca7f743224 /yarns | |
parent | 52916505f5a900a38436e94bb311940dde2f719a (diff) | |
download | obnam-c09778fe5c1fbca31b7dd4cb1a4533fb95e95e06.tar.gz |
Don't allow backup root to be a symbolic link
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/0030-basics.yarn | 20 | ||||
-rw-r--r-- | yarns/9000-implements.yarn | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn index 4bc8439b..c753a10c 100644 --- a/yarns/0030-basics.yarn +++ b/yarns/0030-basics.yarn @@ -157,6 +157,26 @@ instead of a file. THEN the attempt succeeded +Backup root is not a directory +------------------------------ + +Obnam does not, currently, support backing up individual files. The +backup root must be a directory. This scenario verifies that Obnam +gives the right error if the root is not a directory. The error code +is R79ED6X, for "Backup root does not exist or is not a directory". + + SCENARIO backup root is not a directory + + GIVEN a symlink L pointing at /dev/null + WHEN user U attempts to back up directory L to repository R + THEN the attempt failed with exit code 1 + THEN the error message matches "R79ED6X" + + GIVEN a file F in ., with data + WHEN user U attempts to back up directory F to repository R + THEN the attempt failed with exit code 1 + THEN the error message matches "R79ED6X" + Backup to roots at once ----------------------- diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 4fb0fc00..b348a34f 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -104,6 +104,11 @@ We need to manipulate extended attributes. mkdir -p $(dirname "$DATADIR/$MATCH_1") setfattr --name="$MATCH_2" --value "$MATCH_3" "$DATADIR/$MATCH_1" +Create a symlink. + + IMPLEMENTS GIVEN a symlink (\S+) pointing at (\S+) + ln -s "$MATCH_2" "$DATADIR/$MATCH_1" + Sometimes we need to remove a file. IMPLEMENTS WHEN user (\S+) removes file (\S+) |