summaryrefslogtreecommitdiff
path: root/yarns/0030-basics.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-11 20:26:51 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-11 20:26:51 +0000
commite65bdd1e04d01f3ef1e842f10d52e261050b599e (patch)
tree64da6264799ada721b40a682c79f9c5500215545 /yarns/0030-basics.yarn
parent05842d105dca9e20d6c26b50bb78c60ab05e102d (diff)
downloadobnam-e65bdd1e04d01f3ef1e842f10d52e261050b599e.tar.gz
Add yarn test for pretend backups
Remove cmdtest test for this. To make things clearer in the new test, also change all the steps that use a backup repository to have the user specify it explicitly.
Diffstat (limited to 'yarns/0030-basics.yarn')
-rw-r--r--yarns/0030-basics.yarn30
1 files changed, 23 insertions, 7 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
index 5c86b227..e5007487 100644
--- a/yarns/0030-basics.yarn
+++ b/yarns/0030-basics.yarn
@@ -20,10 +20,10 @@ program must be able to handle.
SCENARIO backup simple data
GIVEN 100kB of new data in directory L
AND a manifest of directory L in M
- WHEN user backs up directory L
- AND user restores their latest generation into X
+ WHEN user backs up directory L to repository R
+ AND user restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
- AND user can fsck the repository
+ AND user can fsck the repository R
Backup sparse files
-------------------
@@ -47,8 +47,8 @@ more disk space than the one in live data.
SCENARIO backup a sparse file
GIVEN a file S in L, with a hole, data, a hole
AND a manifest of directory L in M
- WHEN user backs up directory L
- AND user restores their latest generation into X
+ WHEN user backs up directory L to repository R
+ AND user restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
AND file S from L, restored in X doesn't use more disk
@@ -82,6 +82,22 @@ duplication.
SCENARIO backup non-basic filesystem objects
GIVEN directory L with interesting filesystem objects
AND a manifest of directory L in M
- WHEN user backs up directory L
- AND user restores their latest generation into X
+ WHEN user backs up directory L to repository R
+ AND user restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
+
+Pretend backing up: the `--pretend` setting
+-------------------------------------------
+
+The `--pretend` setting lets the user pretend they're doing a backup,
+without actually having anything backed up. This is useful for testing
+that the configuration is correct: the fake backup runs much faster
+than a real one.
+
+ SCENARIO a pretend backup
+ GIVEN directory L with interesting filesystem objects
+ WHEN user backs up directory L to repository R
+ GIVEN a manifest of directory R in M1
+ WHEN user pretends to back up directory L to repository R
+ GIVEN a manifest of directory R in M2
+ THEN manifests M1 and M2 match