add a test case for transition propagation
As was fixed in 6992250d63
.
It took 2-3 years to notice that bug, so this part of git-annex needs
test cases like this.
Sponsored-by: Boyd Stephen Smith Jr. on Patreon
This commit is contained in:
parent
6992250d63
commit
68ddcbb7b8
1 changed files with 36 additions and 0 deletions
36
Test.hs
36
Test.hs
|
@ -360,6 +360,7 @@ unitTests note = testGroup ("Unit Tests " ++ note)
|
|||
, testCase "union merge regression" test_union_merge_regression
|
||||
, testCase "adjusted branch merge regression" test_adjusted_branch_merge_regression
|
||||
, testCase "adjusted branch subtree regression" test_adjusted_branch_subtree_regression
|
||||
, testCase "transition propagation" test_transition_propagation_reversion
|
||||
, testCase "conflict resolution" test_conflict_resolution
|
||||
, testCase "conflict resolution (adjusted branch)" test_conflict_resolution_adjusted_branch
|
||||
, testCase "conflict resolution movein regression" test_conflict_resolution_movein_regression
|
||||
|
@ -2051,3 +2052,38 @@ test_export_import_subdir = intmpclonerepo $ do
|
|||
-- Make sure that import did not import the file to the top
|
||||
-- of the repo.
|
||||
checkdoesnotexist annexedfile
|
||||
|
||||
test_transition_propagation_reversion :: Assertion
|
||||
test_transition_propagation_reversion =
|
||||
withtmpclonerepo $ \r1 ->
|
||||
withtmpclonerepo $ \r2 -> do
|
||||
pair r1 r2
|
||||
indir r1 $ do
|
||||
disconnectOrigin
|
||||
writecontent wormannexedfile $ content wormannexedfile
|
||||
git_annex "add" [wormannexedfile, "--backend=WORM"] "add"
|
||||
git_annex "sync" [] "sync"
|
||||
indir r2 $ do
|
||||
disconnectOrigin
|
||||
git_annex "sync" [] "sync"
|
||||
indir r1 $ do
|
||||
git_annex "sync" [] "sync"
|
||||
indir r2 $ do
|
||||
git_annex "get" [wormannexedfile] "get"
|
||||
git_annex "drop" [wormannexedfile] "drop"
|
||||
git_annex "get" [wormannexedfile] "get"
|
||||
git_annex "drop" [wormannexedfile] "drop"
|
||||
indir r1 $ do
|
||||
git_annex "drop" ["--force", wormannexedfile] "drop"
|
||||
git_annex "sync" [] "sync"
|
||||
git_annex "forget" ["--force"] "forget"
|
||||
git_annex "sync" [] "sync"
|
||||
emptylog
|
||||
indir r2 $ do
|
||||
git_annex "sync" [] "sync"
|
||||
emptylog
|
||||
indir r1 $ do
|
||||
git_annex "sync" [] "sync"
|
||||
emptylog
|
||||
where
|
||||
emptylog = git_annex_expectoutput "log" [wormannexedfile] []
|
||||
|
|
Loading…
Reference in a new issue