Tests `magic markers are correct` and `stop preserves surrounding schedule` depend on some setup in `start preserves existing schedule`. Factor out the setup code. Signed-off-by: Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx> --- t/t7900-maintenance.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh index 6e3ee365ccd..ebde3e8a212 100755 --- a/t/t7900-maintenance.sh +++ b/t/t7900-maintenance.sh @@ -637,9 +637,12 @@ test_expect_success 'stop from existing schedule' ' test_must_be_empty cron.txt ' -test_expect_success 'start preserves existing schedule' ' +test_expect_success 'setup important information for schedule' ' echo "Important information!" >cron.txt && - GIT_TEST_MAINT_SCHEDULER="crontab:test-tool crontab cron.txt" git maintenance start --scheduler=crontab && + GIT_TEST_MAINT_SCHEDULER="crontab:test-tool crontab cron.txt" git maintenance start --scheduler=crontab +' + +test_expect_success 'start preserves existing schedule' ' grep "Important information!" cron.txt ' -- 2.42.0.2.g879ad04204