all commands building except for assistant

also, changed ConfigValue to a newtype, and moved it into Git.Config.
This commit is contained in:
Joey Hess 2019-12-05 14:36:43 -04:00
parent 718fa83da6
commit c20f4704a7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
40 changed files with 187 additions and 174 deletions

15
Test.hs
View file

@ -204,17 +204,12 @@ properties = localOption (QuickCheckTests 1000) $ testGroup "QuickCheck"
- of git-annex. They are always run before the unitTests. -}
initTests :: TestTree
initTests = testGroup "Init Tests"
[]
{-
[ testCase "init" test_init
, testCase "add" test_add
]
-}
unitTests :: String -> TestTree
unitTests note = testGroup ("Unit Tests " ++ note)
[]
{-
[ testCase "add dup" test_add_dup
, testCase "add extras" test_add_extras
, testCase "export_import" test_export_import
@ -629,7 +624,7 @@ test_lock_force = intmpclonerepo $ do
git_annex "get" [annexedfile] @? "get of file failed"
git_annex "unlock" [annexedfile] @? "unlock failed"
annexeval $ do
Just k <- Annex.WorkTree.lookupFile annexedfile
Just k <- Annex.WorkTree.lookupFile (toRawFilePath annexedfile)
Database.Keys.removeInodeCaches k
Database.Keys.closeDb
liftIO . nukeFile =<< Annex.fromRepo Annex.Locations.gitAnnexKeysDbIndexCache
@ -1151,7 +1146,7 @@ test_mixed_conflict_resolution = do
@? (what ++ " too many variant files in: " ++ show v)
indir d $ do
git_annex "get" (conflictor:v) @? ("get failed in " ++ what)
git_annex_expectoutput "find" [conflictor] [Git.FilePath.toInternalGitPath subfile]
git_annex_expectoutput "find" [conflictor] [fromRawFilePath (Git.FilePath.toInternalGitPath (toRawFilePath subfile))]
git_annex_expectoutput "find" v v
{- Check merge conflict resolution when both repos start with an annexed
@ -1348,7 +1343,7 @@ test_conflict_resolution_symlink_bit = unlessM (hasUnlockedFiles <$> getTestMode
where
conflictor = "conflictor"
check_is_link f what = do
git_annex_expectoutput "find" ["--include=*", f] [Git.FilePath.toInternalGitPath f]
git_annex_expectoutput "find" ["--include=*", f] [fromRawFilePath (Git.FilePath.toInternalGitPath (toRawFilePath f))]
l <- annexeval $ Annex.inRepo $ Git.LsTree.lsTreeFiles Git.Ref.headRef [f]
all (\i -> Git.Types.toTreeItemType (Git.LsTree.mode i) == Just Git.Types.TreeSymlink) l
@? (what ++ " " ++ f ++ " lost symlink bit after merge: " ++ show l)
@ -1603,7 +1598,7 @@ test_crypto = do
(c,k) <- annexeval $ do
uuid <- Remote.nameToUUID "foo"
rs <- Logs.Remote.readRemoteLog
Just k <- Annex.WorkTree.lookupFile annexedfile
Just k <- Annex.WorkTree.lookupFile (toRawFilePath annexedfile)
return (fromJust $ M.lookup uuid rs, k)
let key = if scheme `elem` ["hybrid","pubkey"]
then Just $ Utility.Gpg.KeyIds [Utility.Gpg.testKeyId]
@ -1781,5 +1776,3 @@ test_export_import_subdir = intmpclonerepo $ do
-- Make sure that import did not import the file to the top
-- of the repo.
checkdoesnotexist annexedfile
-}