summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/remove-checkpoints.script23
-rw-r--r--yarns/0030-basics.yarn12
-rw-r--r--yarns/9000-implements.yarn11
3 files changed, 23 insertions, 23 deletions
diff --git a/tests/remove-checkpoints.script b/tests/remove-checkpoints.script
deleted file mode 100755
index d61c7e06..00000000
--- a/tests/remove-checkpoints.script
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# Copyright 2011 Lars Wirzenius
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-set -e
-
-$SRCDIR/tests/backup --checkpoint=1k
-
-# Check that there's only one generation.
-$SRCDIR/tests/obnam genids | wc -l | sed 's/ *//'
-
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
-------------------------