diff --git a/test/tests/parallel/set3/container_configuration/process_check_restart.bats b/test/tests/parallel/set3/container_configuration/process_check_restart.bats index 0b7f0301..0a54a60f 100644 --- a/test/tests/parallel/set3/container_configuration/process_check_restart.bats +++ b/test/tests/parallel/set3/container_configuration/process_check_restart.bats @@ -158,7 +158,7 @@ function _should_restart_when_killed() { # NOTE: The process name from `pkill --echo` does not always match the equivalent processs name from `pgrep --list-full`. # The oldest process returned (if multiple) should be the top-level process launched by supervisord, # the PID will verify the target process was killed correctly: - local PID=$(docker exec "${CONTAINER_NAME}" pgrep --full --oldest "${PROCESS}") + local PID=$(_exec_in_container pgrep --full --oldest "${PROCESS}") _run_in_container pkill --echo --full "${PROCESS}" assert_output --partial "killed (pid ${PID})" assert_success @@ -185,7 +185,7 @@ function _check_if_process_is_running() { # `--list-full` provides information for matching against (full process path) # `--full` allows matching the process against the full path (required if a process is not the exec command, such as started by python3 command without a shebang) # `--oldest` should select the parent process when there are multiple results, typically the command defined in `supervisor-app.conf` - local IS_RUNNING=$(docker exec "${CONTAINER_NAME}" pgrep --full --list-full "${MIN_SECS_RUNNING[@]}" --oldest "${PROCESS}") + local IS_RUNNING=$(_exec_in_container pgrep --full --list-full "${MIN_SECS_RUNNING[@]}" --oldest "${PROCESS}") # When no matches are found, nothing is returned. Provide something we can assert on (helpful for debugging): if [[ ! ${IS_RUNNING} =~ ${PROCESS} ]]; then