summaryrefslogtreecommitdiff
path: root/yarns/0100-fuse.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-12-05 14:19:07 +0000
committerLars Wirzenius <liw@liw.fi>2013-12-05 14:19:07 +0000
commit86d658f950608ccb526dae2fe01a0a13f44aa67f (patch)
tree52dab97de7b5fbcc80e4091192aa3004fc10f224 /yarns/0100-fuse.yarn
parente9effdc18fa94e4ecacc282b3cb914df21d3992e (diff)
downloadobnam-86d658f950608ccb526dae2fe01a0a13f44aa67f.tar.gz
Move FUSE tests into new yarn setup
Diffstat (limited to 'yarns/0100-fuse.yarn')
-rw-r--r--yarns/0100-fuse.yarn37
1 files changed, 37 insertions, 0 deletions
diff --git a/yarns/0100-fuse.yarn b/yarns/0100-fuse.yarn
new file mode 100644
index 00000000..303399d9
--- /dev/null
+++ b/yarns/0100-fuse.yarn
@@ -0,0 +1,37 @@
+FUSE plugin
+===========
+
+The FUSE plugin gives read-only access to a backup repository.
+There's a lot of potential corner cases here, but for now, this
+test suite concentrates on verifying that at least the basics work.
+
+ SCENARIO Browsing backups with FUSE plugin
+ ASSUMING user is in group fuse
+ GIVEN live data with interesting filesystem objects
+ AND a manifest of live data in M
+ WHEN user backs up live data
+ AND user FUSE mounts their repository at F
+ THEN live data, restored to F/latest, matches manifest M
+ FINALLY unmount repository F
+
+We can only run this test if the user is in the `fuse` group. This may
+be a portability concern: this works in Debian GNU/Linux, but might be
+different in other Linux distros, or on non-Linux systems. (If it
+doesn't work for you, please report a bug.)
+
+We do the backup, and verify that it can be accessed correctly, by
+doing a manifest of the live data before the backup, and then
+against the FUSE mount, and comparing the two manifests.
+
+ IMPLEMENTS WHEN user FUSE mounts their repository at (\S+)
+ mkdir "$DATADIR/$MATCH_1"
+ run_obnam mount -r "$REPO" --to "$DATADIR/$MATCH_1" --viewmode multiple
+
+If we did do the fuse mount, **always** unmount it, even when a step
+failed. We do not want failed test runs to leavo mounts lying around.
+
+ IMPLEMENTS FINALLY unmount repository (\S+)
+ if [ -e "$DATADIR/$MATCH_1" ]
+ then
+ fusermount -u "$DATADIR/$MATCH_1"
+ fi