summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-03 21:34:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-03 21:34:30 -0400
commitbc2df77642490be830cde9a46428d25051120893 (patch)
treec4bf319c1f640f5dcdf11d1c1fc16e0242c61a3e /test.hs
parent14e0d01b58c504e889b636e952e165f3cf8ab6c9 (diff)
Bugfix: When fsck detected and moved away corrupt file content, it did not update the location log.
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/test.hs b/test.hs
index 936e4da17..31960bb2e 100644
--- a/test.hs
+++ b/test.hs
@@ -367,13 +367,14 @@ test_fsck = "git-annex fsck" ~: TestList [basicfsck, withlocaluntrusted, withrem
git_annex "fsck" ["-q"] @? "fsck failed with numcopies=2 and 2 copies"
git_annex "untrust" ["-q", "origin"] @? "untrust of origin failed"
fsck_should_fail "content not replicated to enough non-untrusted repositories"
+
corrupt f = do
git_annex "get" ["-q", f] @? "get of file failed"
Content.allowWrite f
writeFile f (changedcontent f)
r <- git_annex "fsck" ["-q"]
not r @? "fsck failed to fail with corrupted file content"
- git_annex "fsck" ["-q"] @? "fsck unexpectedly failed again; previous one did not fix problem"
+ git_annex "fsck" ["-q"] @? "fsck unexpectedly failed again; previous one did not fix problem with " ++ f
fsck_should_fail m = do
r <- git_annex "fsck" ["-q"]
not r @? "fsck failed to fail with " ++ m