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 64kB of new data in directory L1 AND 96kB of new data in directory L2 AND a manifest of L1 in M1 AND a manifest of 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 L1 in M1A AND a manifest of 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 Listing clients --------------- In a repository shared by many clients, it may be necessary to list the names, and sometimes to do that without being one of the clients. For example, when restoring a machine that has been destroyed, you may need to list the clients to pick the right one to restore. This test verifies that you can list the clients even if you don't know an existing client's name. SCENARIO list clients without being in the client list GIVEN 1kB of new data in directory L WHEN user U1 backs up directory L to repository R THEN user U2 can see user U1 in repository R Two clients sharing chunks, one forgets its generations ------------------------------------------------------- What happens when two clients share chunks and one of them forgets its generations? A problem was found in this scenario by Nemo Inis in 2014. SCENARIO two clients share chunks and one forgets is generations GIVEN 1k of new data in directory L AND a manifest of L in M WHEN user U1 backs up directory L to repository R AND user U2 backs up directory L to repository R AND user U1 forgets the oldest generation in repository R AND user U2 restores their latest generation in repository R into X THEN L, restored to X, matches manifest M