mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
t921*: test scalar behavior starting maintenance
A user recently reported issues with 'scalar register' and 'scalar clone' in that they failed when the system had permissions locked down so both 'crontab' and 'systemctl' commands failed when trying to enable background maintenance. This hard error is undesirable, but let's create tests that demonstrate this behavior before modiying the behavior. We can use GIT_TEST_MAINT_SCHEDULER to guarantee failure and check the exit code and error message. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
008217cb4a
commit
eeea9ae165
@@ -174,4 +174,10 @@ test_expect_success 'progress without tty' '
|
||||
cleanup_clone $enlistment
|
||||
'
|
||||
|
||||
test_expect_success 'scalar clone fails when background maintenance fails' '
|
||||
GIT_TEST_MAINT_SCHEDULER="crontab:false,launchctl:false,schtasks:false" \
|
||||
test_must_fail scalar clone "file://$(pwd)/to-clone" maint-fail 2>err &&
|
||||
grep "could not turn on maintenance" err
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user