mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-30 23:00:04 +02:00
ci: fix ShellCheck linting for BATS tests (#3347)
* updated `lint.sh` to lint BATS (again) * fix linting errors
This commit is contained in:
parent
1d2df8d499
commit
abd72b6f10
11 changed files with 51 additions and 14 deletions
|
@ -193,6 +193,7 @@ function _should_be_configured_to_fqdn() {
|
|||
assert_success
|
||||
|
||||
# Amavis
|
||||
# shellcheck disable=SC2016
|
||||
_run_in_container grep '^\$myhostname' /etc/amavis/conf.d/05-node_id
|
||||
assert_output "\$myhostname = \"${EXPECTED_FQDN}\";"
|
||||
assert_success
|
||||
|
|
|
@ -179,12 +179,12 @@ function _should_restart_when_killed() {
|
|||
function _check_if_process_is_running() {
|
||||
local PROCESS=${1}
|
||||
local MIN_SECS_RUNNING
|
||||
[[ -n ${2} ]] && MIN_SECS_RUNNING="--older ${2}"
|
||||
[[ -n ${2:-} ]] && MIN_SECS_RUNNING=('--older' "${2}")
|
||||
|
||||
local IS_RUNNING=$(docker exec "${CONTAINER_NAME}" pgrep --list-full ${MIN_SECS_RUNNING} "${PROCESS}")
|
||||
local IS_RUNNING=$(docker exec "${CONTAINER_NAME}" pgrep --list-full "${MIN_SECS_RUNNING[@]}" "${PROCESS}")
|
||||
|
||||
# When no matches are found, nothing is returned. Provide something we can assert on (helpful for debugging):
|
||||
if [[ ! ${IS_RUNNING} =~ "${PROCESS}" ]]
|
||||
if [[ ! ${IS_RUNNING} =~ ${PROCESS} ]]
|
||||
then
|
||||
echo "'${PROCESS}' is not running"
|
||||
return 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue