diff options
author | Derrick Stolee <derrickstolee@github.com> | 2023-01-27 23:06:02 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-27 23:38:26 +0300 |
commit | eeea9ae1657e32ee16f8452ff201b2ca54d51641 (patch) | |
tree | 4941c9077128276816a20786af941715eaf172f6 /t/t9211-scalar-clone.sh | |
parent | 008217cb4a11b1bd9d25eda2d412d813cfeacd9f (diff) |
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>
Diffstat (limited to 't/t9211-scalar-clone.sh')
-rwxr-xr-x | t/t9211-scalar-clone.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh index 02d32fb6ed..a6156da29a 100755 --- a/t/t9211-scalar-clone.sh +++ b/t/t9211-scalar-clone.sh @@ -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 |