summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yarns/0040-generations.yarn11
-rw-r--r--yarns/9000-implements.yarn17
2 files changed, 27 insertions, 1 deletions
diff --git a/yarns/0040-generations.yarn b/yarns/0040-generations.yarn
index 39eb8c9e..adc7d849 100644
--- a/yarns/0040-generations.yarn
+++ b/yarns/0040-generations.yarn
@@ -36,7 +36,16 @@ problem.)
Listing generations (`obnam generations`, `obnam genids`)
-------------------
-FIXME.
+When we make some number of generations, the Obnam generation listing
+commands should show that number of generations.
+
+ SCENARIO list generations
+ GIVEN 1MB of live data
+ WHEN user backs up live data
+ AND user backs up live data
+ AND user backs up live data
+ THEN user sees 3 generations
+ AND user sees 3 generation ids
Listing contents of a generation (`obnam ls`)
--------------------------------
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
index bd264c92..41f99118 100644
--- a/yarns/9000-implements.yarn
+++ b/yarns/9000-implements.yarn
@@ -117,6 +117,23 @@ that is unpredictable.
id=$(run_obnam -r "$REPO" genids | awk -v "n=$MATCH_1" 'NR == n')
run_obnam restore -r "$REPO" --to "$DATADIR/$MATCH_2" --generation "$id"
+Checks on generations
+---------------------
+
+Check that number of generations is correct.
+
+ IMPLEMENTS THEN user sees (\d+) generations
+ run_obnam generations -r "$REPO" > "$DATADIR/generation.list"
+ n=$(wc -l < "$DATADIR/generation.list")
+ test "$MATCH_1" = "$n"
+
+Ditto for generation ids.
+
+ IMPLEMENTS THEN user sees (\d+) generation ids
+ run_obnam generations -r "$REPO" > "$DATADIR/generation-id.list"
+ n=$(wc -l < "$DATADIR/generation-id.list")
+ test "$MATCH_1" = "$n"
+
Checks on files
---------------