summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-08-14 15:11:42 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-08-14 15:11:42 -0400
commit6c4c1a9bccfaa94525f343153b179c2170293686 (patch)
tree7ea95dd024adbcff1fa66e3dd5ef1457c33b1014 /Test.hs
parenta93ff12905005d1cbd2339ddeb8e8abfe2b20079 (diff)
Fix a git-annex test failure when run on NFS due to NFS lock files preventing directory removal.
Should fix this: lock (v6 --force): FAIL Exception: .git/annex/keys: removeDirectoryRecursive: unsatisfied constraints (Directory not empty) Verified that the test case still catches the regression it's meant to. This commit was supported by the NSF-funded DataLad project.
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Test.hs b/Test.hs
index 1e72363a3..6fcdad0c1 100644
--- a/Test.hs
+++ b/Test.hs
@@ -70,6 +70,7 @@ import qualified Types.Messages
import qualified Config
import qualified Config.Cost
import qualified Crypto
+import qualified Database.Keys
import qualified Annex.WorkTree
import qualified Annex.Link
import qualified Annex.Init
@@ -652,6 +653,7 @@ test_lock_v6_force = intmpclonerepoInDirect $ do
git_annex "get" [annexedfile] @? "get of file failed"
git_annex "unlock" [annexedfile] @? "unlock failed in v6 mode"
annexeval $ do
+ Database.Keys.closeDb
dbdir <- Annex.fromRepo Annex.Locations.gitAnnexKeysDb
liftIO $ removeDirectoryRecursive dbdir
writeFile annexedfile "test_lock_v6_force content"