diff options
Diffstat (limited to 't/t7900-maintenance.sh')
-rwxr-xr-x | t/t7900-maintenance.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh index 7440a0ea19..20184e96e1 100755 --- a/t/t7900-maintenance.sh +++ b/t/t7900-maintenance.sh @@ -354,11 +354,14 @@ test_expect_success 'register and unregister' ' git config --global --add maintenance.repo /existing1 && git config --global --add maintenance.repo /existing2 && git config --global --get-all maintenance.repo >before && + git maintenance register && - git config --global --get-all maintenance.repo >actual && - cp before after && - pwd >>after && - test_cmp after actual && + test_cmp_config false maintenance.auto && + git config --global --get-all maintenance.repo >between && + cp before expect && + pwd >>expect && + test_cmp expect between && + git maintenance unregister && git config --global --get-all maintenance.repo >actual && test_cmp before actual @@ -392,4 +395,13 @@ test_expect_success 'start preserves existing schedule' ' grep "Important information!" cron.txt ' +test_expect_success 'register preserves existing strategy' ' + git config maintenance.strategy none && + git maintenance register && + test_config maintenance.strategy none && + git config --unset maintenance.strategy && + git maintenance register && + test_config maintenance.strategy incremental +' + test_done |