From 8cdcd78b210756f184188a583c263569d87f08b4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Dec 2011 13:50:33 -0400 Subject: test bup special remote (74% coverage) --- debian/changelog | 2 +- test.hs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 33a9cd575..59c6392fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,7 @@ git-annex (3.20111212) UNRELEASED; urgency=low * Properly handle multiline git config values. * Fix the hook special remote, which bitrotted a while ago. * map: --fast disables use of dot to display map - * Test suite improvements. Current top-level test coverage: 72% + * Test suite improvements. Current top-level test coverage: 74% -- Joey Hess Mon, 12 Dec 2011 01:57:49 -0400 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 -- cgit v1.2.3