summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-21 13:50:33 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-21 13:50:33 -0400
commit8cdcd78b210756f184188a583c263569d87f08b4 (patch)
tree362406e71f8c591fc67b1bb2a77eecdc5fa916d7 /test.hs
parentc61f3d7b7b61583a61a97b2a7f3adbf4233cd93e (diff)
test bup special remote (74% coverage)
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/test.hs b/test.hs
index eaa3fb8b6..0cd820a2b 100644
--- a/test.hs
+++ b/test.hs
@@ -119,6 +119,7 @@ blackbox = TestLabel "blackbox" $ TestList
, test_hook_remote
, test_directory_remote
, test_rsync_remote
+ , test_bup_remote
, test_crypto
]
@@ -638,6 +639,24 @@ test_rsync_remote = "git-annex rsync remote" ~: intmpclonerepo $ do
not <$> git_annex "drop" [annexedfile, "--numcopies=2"] @? "drop failed to fail"
annexed_present annexedfile
+test_bup_remote :: Test
+test_bup_remote = "git-annex bup remote" ~: intmpclonerepo $ checkbup $ do
+ dir <- absPath "dir" -- bup special remote needs an absolute path
+ createDirectory dir
+ git_annex "initremote" (words $ "foo type=bup encryption=none buprepo="++dir) @? "initremote failed"
+ git_annex "get" [annexedfile] @? "get of file failed"
+ annexed_present annexedfile
+ git_annex "copy" [annexedfile, "--to", "foo"] @? "copy --to bup remote failed"
+ annexed_present annexedfile
+ git_annex "drop" [annexedfile, "--numcopies=2"] @? "drop failed"
+ annexed_notpresent annexedfile
+ git_annex "copy" [annexedfile, "--from", "foo"] @? "copy --from bup remote failed"
+ annexed_present annexedfile
+ not <$> git_annex "move" [annexedfile, "--from", "foo"] @? "move --from bup remote failed to fail"
+ annexed_present annexedfile
+ where
+ checkbup = whenM (inPath "bup")
+
test_crypto :: Test
test_crypto = "git-annex crypto" ~: intmpclonerepo $
-- gpg is not a build dependency, so only test when it's available