summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-25 19:13:48 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-25 19:13:48 +0000
commit0191ae6f8a4dae32583a3e506d6c00e5c13d153e (patch)
tree192524ae46b3787cf553869cd434a87443510480 /yarns
parent99183871095a7cd0b1b588ec27522d0b27aa1723 (diff)
downloadobnam-0191ae6f8a4dae32583a3e506d6c00e5c13d153e.tar.gz
Convert remove-checkpoints into a yarn
Diffstat (limited to 'yarns')
-rw-r--r--yarns/0030-basics.yarn12
-rw-r--r--yarns/9000-implements.yarn11
2 files changed, 23 insertions, 0 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
index a0294484..e7492297 100644
--- a/yarns/0030-basics.yarn
+++ b/yarns/0030-basics.yarn
@@ -102,6 +102,18 @@ assume that if we can backup two, then it'll all work well.
THEN L1, restored to X, matches manifest M1
THEN L2, restored to X, matches manifest M2
+Checkpoint generations
+----------------------
+
+Obnam is meant to remove checkpoint generations it created during a
+backup, if the backup finishes successfully.
+
+ SCENARIO checkpoint generations are removed
+ GIVEN 100kB of new data in directory L
+ AND user U sets configuration checkpoint to 1k
+ WHEN user U backs up directory L to repository R
+ THEN user U sees no checkpoint generations in repository R
+
Pretend backing up: the `--pretend` setting
-------------------------------------------
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
index 1d005d77..ccead253 100644
--- a/yarns/9000-implements.yarn
+++ b/yarns/9000-implements.yarn
@@ -265,6 +265,17 @@ Ditto for generation ids.
n=$(wc -l < "$DATADIR/generation-id.list")
test "$MATCH_2" = "$n"
+Check that there are no checkpoint generations.
+
+ IMPLEMENTS THEN user (\S+) sees no checkpoint generations in repository (\S+)
+ run_obnam "$MATCH_1" generations -r "$DATADIR/$MATCH_2" \
+ > "$DATADIR/generation.list"
+ if grep checkoint "$DATADIR/generation.list"
+ then
+ echo "Can see checkpoint generations!" 1>&2
+ exit 1
+ fi
+
Diffs between generations
-------------------------