diff options
author | Derrick Stolee <derrickstolee@github.com> | 2023-01-27 23:06:03 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-27 23:38:26 +0300 |
commit | dea63088928cde2fd264a852a9b14c05178e0838 (patch) | |
tree | 40ba5f067191ccd6a520732eadde01a9fbf15209 /t/t9210-scalar.sh | |
parent | eeea9ae1657e32ee16f8452ff201b2ca54d51641 (diff) |
scalar: only warn when background maintenance fails
A user reported issues with 'scalar clone' and 'scalar register' when
working in an environment that had locked down the ability to run
'crontab' or 'systemctl' in that those commands registered as _failures_
instead of opportunistically reporting a success with just a warning
about background maintenance.
As a workaround, they can use GIT_TEST_MAINT_SCHEDULER to fake a
successful background maintenance, but this is not a viable strategy for
long-term.
Update 'scalar register' and 'scalar clone' to no longer fail by
modifying register_dir() to only warn when toggle_maintenance(1) fails.
Since background maintenance is a "nice to have" and not a requirement
for a working repository, it is best to move this from hard error to
gentle warning.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9210-scalar.sh')
-rwxr-xr-x | t/t9210-scalar.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh index 13a4f6dbcf..4432a30d10 100755 --- a/t/t9210-scalar.sh +++ b/t/t9210-scalar.sh @@ -104,10 +104,10 @@ test_expect_success FSMONITOR_DAEMON 'scalar register starts fsmon daemon' ' test_cmp_config -C test/src true core.fsmonitor ' -test_expect_success 'scalar register fails when background maintenance fails' ' +test_expect_success 'scalar register warns when background maintenance fails' ' git init register-repo && GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \ - test_must_fail scalar register register-repo 2>err && + scalar register register-repo 2>err && grep "could not turn on maintenance" err ' |