summaryrefslogtreecommitdiff
path: root/yarns/0050-multiple-clients.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-12 10:29:02 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-12 10:29:02 +0000
commitdff58cd5e33003fdf3eb73549c450b76838c6cbe (patch)
tree747c820bab9f2465815971227f3ab51d0335e681 /yarns/0050-multiple-clients.yarn
parente65bdd1e04d01f3ef1e842f10d52e261050b599e (diff)
downloadobnam-dff58cd5e33003fdf3eb73549c450b76838c6cbe.tar.gz
Add test for multiple clients sharing a repository
As part of this, make every repository operation step require an explicit client name. The v6 reference formats have a client name embedded that is the hostname of my laptop, so make those tests use that name. This fixes what would not have run previously on any system that isn't named havelock. Oops.
Diffstat (limited to 'yarns/0050-multiple-clients.yarn')
-rw-r--r--yarns/0050-multiple-clients.yarn40
1 files changed, 40 insertions, 0 deletions
diff --git a/yarns/0050-multiple-clients.yarn b/yarns/0050-multiple-clients.yarn
new file mode 100644
index 00000000..63383654
--- /dev/null
+++ b/yarns/0050-multiple-clients.yarn
@@ -0,0 +1,40 @@
+Multiple clients sharing a repository
+=====================================
+
+An Obnam backup repository may be shared by multiple clients. There
+are a couple of aspects of this that need testing: whether it works at
+all, when each client is run in sequence, and whether it works
+concurrently, with locks used to exclude other clients from modifying
+the shared data.
+
+The concurrency is really hard to test well. There is a non-yarn test
+for locking, which we assume will test that, and so in this yarn test
+suite we do not test concurrency at all.
+
+ SCENARIO two clients sharing a repository
+ GIVEN directory L1 with interesting filesystem objects
+ AND directory L2 with interesting filesystem objects
+ AND a manifest of directory L1 in M1
+ AND a manifest of directory L2 in M2
+ WHEN user U1 backs up directory L1 to repository R
+ WHEN user U2 backs up directory L2 to repository R
+ AND user U1 restores their latest generation in repository R into X1
+ AND user U2 restores their latest generation in repository R into X2
+ THEN L1, restored to X1, matches manifest M1
+ AND L2, restored to X2, matches manifest M2
+
+In addition to backing up, we check for forget working. We first make
+a change to both sets of live data, and
+
+ GIVEN 1kB of new data in directory L1
+ AND 2kB of new data in directory L2
+ AND a manifest of directory L1 in M1A
+ AND a manifest of directory L2 in M2A
+ WHEN user U1 backs up directory L1 to repository R
+ AND user U2 backs up directory L2 to repository R
+ AND user U1 forgets the oldest generation in repository R
+ AND user U2 forgets the oldest generation in repository R
+ AND user U1 restores their latest generation in repository R into X1A
+ AND user U2 restores their latest generation in repository R into X2A
+ THEN L1, restored to X1A, matches manifest M1A
+ AND L2, restored to X2A, matches manifest M2A