From c6672776b363cfc23f9a73000e918fa893a26b37 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 16 Apr 2014 07:52:18 +0100 Subject: Add scenario for forcing locks open --- yarns/0090-lock-handling.yarn | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 yarns/0090-lock-handling.yarn (limited to 'yarns/0090-lock-handling.yarn') 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 -- cgit v1.2.1