summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/test.hs b/test.hs
index 31960bb2e..49f7f2ab9 100644
--- a/test.hs
+++ b/test.hs
@@ -29,7 +29,7 @@ import qualified Backend
import qualified GitRepo as Git
import qualified Locations
import qualified Utility
-import qualified BackendTypes
+import qualified BackendClass
import qualified Types
import qualified GitAnnex
import qualified LocationLog
@@ -38,6 +38,7 @@ import qualified Trust
import qualified Remotes
import qualified Content
import qualified Command.DropUnused
+import qualified Key
main :: IO ()
main = do
@@ -55,7 +56,7 @@ quickcheck :: Test
quickcheck = TestLabel "quickcheck" $ TestList
[ qctest "prop_idempotent_deencode" Git.prop_idempotent_deencode
, qctest "prop_idempotent_fileKey" Locations.prop_idempotent_fileKey
- , qctest "prop_idempotent_key_read_show" BackendTypes.prop_idempotent_key_read_show
+ , qctest "prop_idempotent_key_read_show" Key.prop_idempotent_key_read_show
, qctest "prop_idempotent_shellEscape" Utility.prop_idempotent_shellEscape
, qctest "prop_idempotent_shellEscape_multiword" Utility.prop_idempotent_shellEscape_multiword
, qctest "prop_parentDir_basics" Utility.prop_parentDir_basics
@@ -119,10 +120,10 @@ test_add = "git-annex add" ~: TestList [basic, sha1dup]
test_setkey :: Test
test_setkey = "git-annex setkey/fromkey" ~: TestCase $ inmainrepo $ do
writeFile tmp $ content sha1annexedfile
- r <- annexeval $ BackendTypes.getKey backendSHA1 tmp
- let sha1 = BackendTypes.keyName $ fromJust r
- git_annex "setkey" ["-q", "--backend", "SHA1", "--key", sha1, tmp] @? "setkey failed"
- git_annex "fromkey" ["-q", "--backend", "SHA1", "--key", sha1, sha1annexedfile] @? "fromkey failed"
+ r <- annexeval $ BackendClass.getKey backendSHA1 tmp
+ let key = show $ fromJust r
+ git_annex "setkey" ["-q", "--key", key, tmp] @? "setkey failed"
+ git_annex "fromkey" ["-q", "--key", key, sha1annexedfile] @? "fromkey failed"
Utility.boolSystem "git" [Utility.Params "commit -q -a -m commit"] @? "git commit failed"
annexed_present sha1annexedfile
where
@@ -438,7 +439,7 @@ test_unused = "git-annex unused/dropunused" ~: intmpclonerepo $ do
checkunused [annexedfilekey, sha1annexedfilekey]
-- good opportunity to test dropkey also
- git_annex "dropkey" ["-q", "--force", BackendTypes.keyName annexedfilekey]
+ git_annex "dropkey" ["-q", "--force", show annexedfilekey]
@? "dropkey failed"
checkunused [sha1annexedfilekey]