diff options
author | Joey Hess <joey@kitenet.net> | 2011-09-14 13:47:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-14 13:47:22 -0400 |
commit | 949b3f69d0f2b2a5c32a00d05d09a0b312fad35a (patch) | |
tree | cc81f8d61652741e365309b86a8020edbce6318e /test.hs | |
parent | 1ac6217c74b63b9b154d5ee14ed72df8b5aa9268 (diff) |
optimize: A new subcommand that either gets or drops file content as needed to work toward meeting the configured numcopies setting.
This is currently rather simplistic, though still useful.
In the future, it could become smarter about what content is stored where,
etc.
Diffstat (limited to 'test.hs')
-rw-r--r-- | test.hs | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -93,6 +93,7 @@ blackbox = TestLabel "blackbox" $ TestList , test_unannex , test_drop , test_get + , test_optimize , test_move , test_copy , test_lock @@ -216,6 +217,17 @@ test_get = "git-annex get" ~: TestCase $ intmpclonerepo $ do inmainrepo $ unannexed ingitfile unannexed ingitfile +test_optimize :: Test +test_optimize = "git-annex optimize" ~: TestCase $ intmpclonerepo $ do + inmainrepo $ annexed_present annexedfile + annexed_notpresent annexedfile + git_annex "optimize" ["-q", annexedfile, "--numcopies=2"] @? "optimize of file failed" + inmainrepo $ annexed_present annexedfile + annexed_present annexedfile + git_annex "optimize" ["-q", annexedfile] @? "optimize of file failed" + inmainrepo $ annexed_present annexedfile + annexed_notpresent annexedfile + test_move :: Test test_move = "git-annex move" ~: TestCase $ intmpclonerepo $ do annexed_notpresent annexedfile |