mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
Merge branch 'ds/scalar-ignore-cron-error'
Allow "scalar" to warn but continue when its periodic maintenance feature cannot be enabled. * ds/scalar-ignore-cron-error: scalar: only warn when background maintenance fails t921*: test scalar behavior starting maintenance t: allow 'scalar' in test_must_fail
This commit is contained in:
commit
3fe6612d4c
2
scalar.c
2
scalar.c
|
@ -262,7 +262,7 @@ static int register_dir(void)
|
|||
return error(_("could not set recommended config"));
|
||||
|
||||
if (toggle_maintenance(1))
|
||||
return error(_("could not turn on maintenance"));
|
||||
warning(_("could not turn on maintenance"));
|
||||
|
||||
if (have_fsmonitor_support() && start_fsmonitor_daemon()) {
|
||||
return error(_("could not start the FSMonitor daemon"));
|
||||
|
|
|
@ -104,6 +104,13 @@ test_expect_success FSMONITOR_DAEMON 'scalar register starts fsmon daemon' '
|
|||
test_cmp_config -C test/src true core.fsmonitor
|
||||
'
|
||||
|
||||
test_expect_success 'scalar register warns when background maintenance fails' '
|
||||
git init register-repo &&
|
||||
GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
|
||||
scalar register register-repo 2>err &&
|
||||
grep "could not turn on maintenance" err
|
||||
'
|
||||
|
||||
test_expect_success 'scalar unregister' '
|
||||
git init vanish/src &&
|
||||
scalar register vanish/src &&
|
||||
|
|
|
@ -174,4 +174,10 @@ test_expect_success 'progress without tty' '
|
|||
cleanup_clone $enlistment
|
||||
'
|
||||
|
||||
test_expect_success 'scalar clone warns when background maintenance fails' '
|
||||
GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
|
||||
scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
|
||||
grep "could not turn on maintenance" err
|
||||
'
|
||||
|
||||
test_done
|
||||
|
|
|
@ -1016,7 +1016,7 @@ test_must_fail_acceptable () {
|
|||
fi
|
||||
|
||||
case "$1" in
|
||||
git|__git*|test-tool|test_terminal)
|
||||
git|__git*|scalar|test-tool|test_terminal)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in a new issue