summaryrefslogtreecommitdiff
path: root/yarns/0050-multiple-clients.yarn
diff options
context:
space:
mode:
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