remove some tests that no longer make sense
This commit is contained in:
parent
4c4ebf2d75
commit
d70e9a945b
1 changed files with 1 additions and 23 deletions
24
test.hs
24
test.hs
|
@ -105,12 +105,7 @@ blackbox = TestLabel "blackbox" $ TestList
|
||||||
test_init :: Test
|
test_init :: Test
|
||||||
test_init = "git-annex init" ~: TestCase $ innewrepo $ do
|
test_init = "git-annex init" ~: TestCase $ innewrepo $ do
|
||||||
git_annex "init" ["-q", reponame] @? "init failed"
|
git_annex "init" ["-q", reponame] @? "init failed"
|
||||||
e <- doesFileExist annexlog
|
|
||||||
e @? (annexlog ++ " not created")
|
|
||||||
c <- readFile annexlog
|
|
||||||
reponame `isInfixOf` c @? annexlog ++ " does not contain repo name"
|
|
||||||
where
|
where
|
||||||
annexlog = ".git-annex/uuid.log"
|
|
||||||
reponame = "test repo"
|
reponame = "test repo"
|
||||||
|
|
||||||
test_add :: Test
|
test_add :: Test
|
||||||
|
@ -609,26 +604,9 @@ checklocationlog f expected = do
|
||||||
r <- annexeval $ Backend.lookupFile f
|
r <- annexeval $ Backend.lookupFile f
|
||||||
case r of
|
case r of
|
||||||
Just (k, _) -> do
|
Just (k, _) -> do
|
||||||
uuids <- annexeval $ do
|
uuids <- annexeval $ LocationLog.keyLocations k
|
||||||
g <- Annex.gitRepo
|
|
||||||
LocationLog.keyLocations g k
|
|
||||||
assertEqual ("bad content in location log for " ++ f ++ " key " ++ (show k) ++ " uuid " ++ thisuuid)
|
assertEqual ("bad content in location log for " ++ f ++ " key " ++ (show k) ++ " uuid " ++ thisuuid)
|
||||||
expected (thisuuid `elem` uuids)
|
expected (thisuuid `elem` uuids)
|
||||||
|
|
||||||
-- Location log files should always be checked
|
|
||||||
-- into git, and any modifications staged for
|
|
||||||
-- commit. This is a regression test, as some
|
|
||||||
-- commands forgot to.
|
|
||||||
(fs, ufs) <- annexeval $ do
|
|
||||||
g <- Annex.gitRepo
|
|
||||||
let lf = LocationLog.logFile g k
|
|
||||||
fs <- liftIO $ Git.inRepo g [lf]
|
|
||||||
ufs <- liftIO $ Git.changedUnstagedFiles g [lf]
|
|
||||||
return (fs, ufs)
|
|
||||||
when (null fs) $
|
|
||||||
assertFailure $ f ++ " logfile not added to git repo"
|
|
||||||
when (not $ null ufs) $
|
|
||||||
assertFailure $ f ++ " logfile changes not staged"
|
|
||||||
_ -> assertFailure $ f ++ " failed to look up key"
|
_ -> assertFailure $ f ++ " failed to look up key"
|
||||||
|
|
||||||
inlocationlog :: FilePath -> Assertion
|
inlocationlog :: FilePath -> Assertion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue