diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-02-08 20:14:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-08 20:14:42 +0300 |
commit | 3fe6612d4cb85d9e92ad339ac6ef975780715c40 (patch) | |
tree | c93e9ff09af4f0521cdc303958b679bf9c78d5c3 /t | |
parent | c6dea59323c70ae29adaac6a6ec75cf653ad753c (diff) | |
parent | dea63088928cde2fd264a852a9b14c05178e0838 (diff) |
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
Diffstat (limited to 't')
-rwxr-xr-x | t/t9210-scalar.sh | 7 | ||||
-rwxr-xr-x | t/t9211-scalar-clone.sh | 6 | ||||
-rw-r--r-- | t/test-lib-functions.sh | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/t/t9210-scalar.sh b/t/t9210-scalar.sh index 25f500cf68..4432a30d10 100755 --- a/t/t9210-scalar.sh +++ b/t/t9210-scalar.sh @@ -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 && diff --git a/t/t9211-scalar-clone.sh b/t/t9211-scalar-clone.sh index 02d32fb6ed..872ad1c9c2 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 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 diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 7992222703..75b8ee95e7 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -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 ;; *) |