summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-03-21 07:40:17 +0000
committerLars Wirzenius <liw@liw.fi>2014-03-21 07:40:17 +0000
commit0628d55f2582af6ffb34ec12a20832e9fad73515 (patch)
treefa4892d45e8c7e238249eba2d2d5f36ec523c54b /yarns
parentd5973757f5be3704823c36567dba31c04d12b733 (diff)
downloadobnam-0628d55f2582af6ffb34ec12a20832e9fad73515.tar.gz
Convert verifies-randomly from cmdtest to yarn
Diffstat (limited to 'yarns')
-rw-r--r--yarns/0080-verify.yarn16
-rw-r--r--yarns/9000-implements.yarn6
2 files changed, 21 insertions, 1 deletions
diff --git a/yarns/0080-verify.yarn b/yarns/0080-verify.yarn
index 68a508ba..8bc2c239 100644
--- a/yarns/0080-verify.yarn
+++ b/yarns/0080-verify.yarn
@@ -1,10 +1,13 @@
Verify backed up data
=====================
+Verify notices modification time change
+---------------------------------------
+
The user may want to verify that all their live data is still intact.
This is done with `obnam verify`.
- SCENARIO verify live data
+ SCENARIO verify notices mtime change
GIVEN 100kB of new data in directory L
AND file L/foo has Unix timestamp 0
WHEN user U backs up directory L to repository R
@@ -22,3 +25,14 @@ RDF30DX is the error code for metadata change, of which modification
time is one.
THEN the error message matches "RDF30DX.*st_mtime_sec"
+
+Verify one file randomly
+------------------------
+
+`obnam verify` can pick files to verify randomly, for spot checks.
+
+ SCENARIO verify a random file
+ GIVEN 100kB of new data in directory L
+ WHEN user U backs up directory L to repository R
+ AND user U attempts to verify a random file in L against repository R
+ THEN the attempt succeeded
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
index 25400662..ab0fe1c8 100644
--- a/yarns/9000-implements.yarn
+++ b/yarns/9000-implements.yarn
@@ -269,6 +269,12 @@ Run `obnam verify` and remember the output.
attempt run_obnam "$MATCH_1" \
verify -r "$DATADIR/$MATCH_3" "$DATADIR/$MATCH_2"
+Verify a random file in live data.
+
+ IMPLEMENTS WHEN user (\S+) attempts to verify a random file in (\S+) against repository (\S+)
+ attempt run_obnam "$MATCH_1" \
+ verify -r "$DATADIR/$MATCH_3" --verify-randomly=1 "$DATADIR/$MATCH_2"
+
Removing (forgetting) generations
---------------------------------