diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-12-06 14:09:53 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-12-06 14:09:53 +0000 |
commit | 83ab008674af1a1240111fa806517b73f23b1b23 (patch) | |
tree | 7292a7a87fbcfe286ff52c2b8423b7948f503944 /yarns/9000-implements.yarn | |
parent | cfb79fc07a9c0ba3ec93a0f25b5e02369b281cc8 (diff) | |
download | obnam-83ab008674af1a1240111fa806517b73f23b1b23.tar.gz |
Add a scenario test for "obnam forget"
Diffstat (limited to 'yarns/9000-implements.yarn')
-rw-r--r-- | yarns/9000-implements.yarn | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 956e8df5..57abe745 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -110,6 +110,17 @@ 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" +Removing (forgetting) generations +--------------------------------- + +Remove the oldest generation. + + IMPLEMENTS WHEN user forgets the oldest generation + # The grep below at the end of pipeline is there to make sure + # the pipeline fails if there were no generations. + id=$(run_obnam -r "$REPO" genids | head -n1 | grep .) + run_obnam forget -r "$REPO" "$id" + List generations ---------------- @@ -128,7 +139,7 @@ Checks on generations Check that number of generations is correct. - IMPLEMENTS THEN user sees (\d+) generations + IMPLEMENTS THEN user sees (\d+) generation(s?) run_obnam generations -r "$REPO" > "$DATADIR/generation.list" n=$(wc -l < "$DATADIR/generation.list") test "$MATCH_1" = "$n" |