summaryrefslogtreecommitdiff
path: root/Test.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Test.hs')
-rw-r--r--Test.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Test.hs b/Test.hs
index e57c9021c..e8440dd1d 100644
--- a/Test.hs
+++ b/Test.hs
@@ -199,6 +199,7 @@ unitTests note = testGroup ("Unit Tests " ++ note)
, testCase "fsck (bare)" test_fsck_bare
, testCase "fsck (local untrusted)" test_fsck_localuntrusted
, testCase "fsck (remote untrusted)" test_fsck_remoteuntrusted
+ , testCase "fsck --from remote" test_fsck_fromremote
, testCase "migrate" test_migrate
, testCase "migrate (via gitattributes)" test_migrate_via_gitattributes
, testCase "unused" test_unused
@@ -613,6 +614,10 @@ test_fsck_remoteuntrusted = intmpclonerepo $ do
git_annex "untrust" ["origin"] @? "untrust of origin failed"
fsck_should_fail "content not replicated to enough non-untrusted repositories"
+test_fsck_fromremote :: Assertion
+test_fsck_fromremote = intmpclonerepo $ do
+ git_annex "fsck" ["--from", "origin"] @? "fsck --from origin failed"
+
fsck_should_fail :: String -> Assertion
fsck_should_fail m = not <$> git_annex "fsck" []
@? "fsck failed to fail with " ++ m