summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-17 15:20:21 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-17 15:20:21 -0400
commit6cb343f95e15aa52ec1a32b5ae1154ccdf4f6e62 (patch)
treea3bf5e1364e1d6583a356074d6549f4117dd33c8 /Test.hs
parent5468a6fc01b275bbcc47054829ba53f01625bf4c (diff)
fsck behavior varies in direct mode when the file is modified
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Test.hs b/Test.hs
index 2873cd896..ce5fef3c7 100644
--- a/Test.hs
+++ b/Test.hs
@@ -455,7 +455,10 @@ test_fsck env = "git-annex fsck" ~: TestList [basicfsck, barefsck, withlocaluntr
git_annex env "get" [f] @? "get of file failed"
Utility.FileMode.allowWrite f
writeFile f (changedcontent f)
- not <$> git_annex env "fsck" [] @? "fsck failed to fail with corrupted file content"
+ ifM (annexeval Config.isDirect)
+ ( git_annex env "fsck" [] @? "fsck failed in direct mode with changed file content"
+ , not <$> git_annex env "fsck" [] @? "fsck failed to fail with corrupted file content"
+ )
git_annex env "fsck" [] @? "fsck unexpectedly failed again; previous one did not fix problem with " ++ f
fsck_should_fail m = do
not <$> git_annex env "fsck" [] @? "fsck failed to fail with " ++ m