diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-18 13:36:12 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-18 13:36:12 -0400 |
commit | 293903ba38209a1e574ab6a929872ac5c31dfaf4 (patch) | |
tree | 9c0d49fbb06ee2b656834ddd01c6edd8f3f5f7ec /Test.hs | |
parent | e770543c1010526d98730112d58ed304ab4ea341 (diff) |
Fix fsck --from a git remote in a local directory, and from a directory special remote. This was a reversion caused by the relative path changes in 5.20150113.
The directory special remote was not affected in its normal configuration,
since annex-directory is an absolute path normally. But it could fail
when a relative path was used.
The git remote was affected even when an absolute path to it was used in
.git/config, since git-annex now converts all such paths to relative.
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |