Skip to content

Commit 398bcb7

Browse files
Fix stop-others goal
it should stop others except rabbitmq
1 parent 1721d71 commit 398bcb7

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

selenium/bin/components/keycloak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ start_keycloak() {
4242
--publish 8443:8443 \
4343
--env KEYCLOAK_ADMIN=admin \
4444
--env KEYCLOAK_ADMIN_PASSWORD=admin \
45-
--mount type=bind,source=${MOUNT_KEYCLOAK_CONF_DIR},target=/opt/keycloak/data/import/ \
45+
-v ${MOUNT_KEYCLOAK_CONF_DIR}:/opt/keycloak/data/import/ \
4646
${KEYCLOAK_DOCKER_IMAGE} start-dev --import-realm \
4747
--https-certificate-file=/opt/keycloak/data/import/server_keycloak_certificate.pem \
4848
--https-certificate-key-file=/opt/keycloak/data/import/server_keycloak_key.pem

selenium/bin/suite_template

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ teardown_local_others() {
571571
if [[ $REQUIRED_COMPONENTS == "" ]]; then
572572
print "There are no other components"
573573
else
574-
teardown_components
574+
teardown_components true
575575
fi
576576
}
577577
test_local() {
@@ -624,13 +624,18 @@ start_components() {
624624
}
625625

626626
teardown_components() {
627-
begin "Tear down ..."
627+
skip_rabbitmq=${1:-false}
628+
629+
begin "Tear down ... $skip_rabbitmq"
628630
for i in "${REQUIRED_COMPONENTS[@]}"
629631
do
630-
local component="$i"
631-
stop="stop_$i"
632-
type "$stop" &>/dev/null && $stop || kill_container_if_exist "$component"
633-
print "Tear down $component"
632+
if [[ $i != "rabbitmq" || ($i == "rabbitmq" && $skip_rabbitmq == false) ]]
633+
then
634+
local component="$i"
635+
stop="stop_$i"
636+
type "$stop" &>/dev/null && $stop || kill_container_if_exist "$component"
637+
print "Tear down $component"
638+
fi
634639
done
635640
end "Finished teardown"
636641
}

0 commit comments

Comments
 (0)