From c09778fe5c1fbca31b7dd4cb1a4533fb95e95e06 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 11 Apr 2014 18:56:16 +0100 Subject: Don't allow backup root to be a symbolic link --- yarns/0030-basics.yarn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'yarns/0030-basics.yarn') 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 ----------------------- -- cgit v1.2.1