diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-04-16 07:52:18 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-04-16 07:52:18 +0100 |
commit | c6672776b363cfc23f9a73000e918fa893a26b37 (patch) | |
tree | b5bdcc47b40a29cd92fa95447bb212e3b2b48fc5 /yarns/0090-lock-handling.yarn | |
parent | 2bc881db5fba2fcff507cc9e418600f77d37d747 (diff) | |
download | obnam-c6672776b363cfc23f9a73000e918fa893a26b37.tar.gz |
Add scenario for forcing locks open
Diffstat (limited to 'yarns/0090-lock-handling.yarn')
-rw-r--r-- | yarns/0090-lock-handling.yarn | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/yarns/0090-lock-handling.yarn b/yarns/0090-lock-handling.yarn new file mode 100644 index 00000000..2c88a0a1 --- /dev/null +++ b/yarns/0090-lock-handling.yarn @@ -0,0 +1,34 @@ +Lock handling +============= + +This chapter contains scenarios for testing Obnam's lock handling, +specifically the forcing of locks to become open when lock files have +been left by Obnam for whatever reason. + + +Basic forcing of a lock +----------------------- + +In this scenario, we force a repository to be locked, and force the +lock open. To do this, we use an Obnam command that locks the desired +parts of the repository, and does nothing else; this is a testing aid. + + SCENARIO force repository open + +We first create the repository and back up some data. + + GIVEN 1kB of new data in directory L + WHEN user U backs up directory L to repository R + +We then lock the repository, and verify that a backup now fails. + + AND user U locks repository R + AND user U attempts to back up directory L to repository R + THEN the attempt failed with exit code 1 + AND the error message matches "xxxxx" + +Now we can force the lock open and verify that a backup now succeeds. + + WHEN user U forces open the lock on repository R + AND user U attempts to back up directory L to repository R + THEN the attempt succeeded |