Skip to content

Commit

Permalink
TEST/MINOR: e2e: swap kill -SIGUSR with kill -s 12 invocations
Browse files Browse the repository at this point in the history
  • Loading branch information
mjuraga committed Dec 8, 2023
1 parent 38e313f commit 3351e3c
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ stages:
- e2e
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-alpine
DOCKER_BASE_IMAGE: haproxytech/haproxy-debian
BATS_VERSION: v1.4.1
GO_VERSION: '1.21'

Expand Down
4 changes: 2 additions & 2 deletions e2e/fixtures/dataplaneapi-master-socket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ haproxy:
master_runtime: /var/lib/haproxy/master
master_worker_mode: true
reload:
reload_cmd: kill -SIGUSR2 1
restart_cmd: kill -SIGUSR2 1
reload_cmd: kill -s 12 1
restart_cmd: kill -s 12 1
log:
log_to: file
log_file: /var/log/dataplaneapi.log
Expand Down
4 changes: 2 additions & 2 deletions e2e/fixtures/dataplaneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ haproxy:
config_file: /etc/haproxy/haproxy.cfg
haproxy_bin: /usr/local/sbin/haproxy
reload:
reload_cmd: kill -SIGUSR2 1
restart_cmd: kill -SIGUSR2 1
reload_cmd: kill -s 12 1
restart_cmd: kill -s 12 1
log:
log_to: file
log_file: /var/log/dataplaneapi.log
Expand Down
4 changes: 2 additions & 2 deletions e2e/libs/haproxy_config_setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ setup() {
assert_success
fi

run dpa_docker_exec 'kill -SIGUSR2 1'
run dpa_docker_exec 'kill -s 12 1'
assert_success

run dpa_docker_exec 'pkill -9 dataplaneapi'
Expand Down Expand Up @@ -111,7 +111,7 @@ teardown() {
run docker cp "${E2E_DIR}/fixtures/dataplaneapi.yaml" "${DOCKER_CONTAINER_NAME}:/etc/haproxy/dataplaneapi.yaml"
assert_success

run dpa_docker_exec 'kill -SIGUSR2 1'
run dpa_docker_exec 'kill -s 12 1'
assert_success

run dpa_docker_exec 'pkill -9 dataplaneapi'
Expand Down
2 changes: 1 addition & 1 deletion e2e/run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ set -eo pipefail
export BASE_PATH="/v2"

HAPROXY_VERSION=${HAPROXY_VERSION:-2.9}
DOCKER_BASE_IMAGE="${DOCKER_BASE_IMAGE:-haproxytech/haproxy-alpine}:${HAPROXY_VERSION}"
DOCKER_BASE_IMAGE="${DOCKER_BASE_IMAGE:-haproxytech/haproxy-debian}:${HAPROXY_VERSION}"
DOCKER_CONTAINER_NAME="dataplaneapi-e2e"
export DOCKER_CONTAINER_NAME

Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/set_uid/dataplaneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ haproxy:
config_file: /home/testuiduser/haproxy.cfg
haproxy_bin: /usr/local/sbin/haproxy
reload:
reload_cmd: kill -SIGUSR2 1
restart_cmd: kill -SIGUSR2 1
reload_cmd: kill -s 12 1
restart_cmd: kill -s 12 1
4 changes: 2 additions & 2 deletions e2e/tests/set_uid/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
load '../../libs/dataplaneapi'

setup() {
run dpa_docker_exec 'kill -SIGUSR2 1'
run dpa_docker_exec 'kill -s 12 1'
assert_success

run dpa_docker_exec 'pkill -9 dataplaneapi'
Expand Down Expand Up @@ -48,7 +48,7 @@ teardown() {
run docker cp "${E2E_DIR}/fixtures/dataplaneapi.yaml" "${DOCKER_CONTAINER_NAME}:/usr/local/bin/dataplaneapi.yaml"
assert_success

run dpa_docker_exec 'kill -SIGUSR2 1'
run dpa_docker_exec 'kill -s 12 1'
assert_success

run dpa_docker_exec 'pkill -9 dataplaneapi'
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/storage_maps/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ load 'utils/_helpers'

# sometimes we can't establish a connection to the haproxy stat socket
# forcing haproxy to restart seems to fix that
assert dpa_docker_exec 'kill -SIGUSR2 1'
assert dpa_docker_exec 'kill -s 12 1'
sleep 1

resource_get "$_STORAGE_MAPS_BASE_PATH/"
Expand Down

0 comments on commit 3351e3c

Please sign in to comment.