ci: fix ShellCheck linting for BATS tests (#3347)

* updated `lint.sh` to lint BATS (again)
* fix linting errors
This commit is contained in:
Georg Lauterbach 2023-05-23 16:33:58 +02:00 committed by GitHub
parent 1d2df8d499
commit abd72b6f10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 51 additions and 14 deletions

View file

@ -1,3 +1,5 @@
# shellcheck disable=SC2314,SC2317
load "${REPOSITORY_ROOT}/test/test_helper/common"
BATS_TEST_NAME_PREFIX='test helper functions:'

View file

@ -164,6 +164,7 @@ function teardown_file() { _default_teardown ; }
}
@test "amavis: old virusmail is wipped by cron" {
# shellcheck disable=SC2016
_exec_in_container_bash 'touch -d "`date --date=2000-01-01`" /var/lib/amavis/virusmails/should-be-deleted'
_run_in_container_bash '/usr/local/bin/virus-wiper'
assert_success
@ -172,6 +173,7 @@ function teardown_file() { _default_teardown ; }
}
@test "amavis: recent virusmail is not wipped by cron" {
# shellcheck disable=SC2016
_exec_in_container_bash 'touch -d "`date`" /var/lib/amavis/virusmails/should-not-be-deleted'
_run_in_container_bash '/usr/local/bin/virus-wiper'
assert_success