1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
|