Skip to content

Commit b6a92ec

Browse files
committed
Fix critical shellcheck issues in selenium component scripts
Address only the most critical shellcheck issues without excessive quoting: - Add missing shebangs to 3 files (devkeycloak-proxy, forward-proxy, proxy) - Replace legacy backtick syntax with modern $() in 2 files - Remove unused SCRIPT variable in rabbitmq These changes improve script portability and maintainability while keeping the existing coding style. Remaining SC2086 (quoting) warnings are informational and left as-is per project preference.
1 parent d06c0f7 commit b6a92ec

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

selenium/bin/components/devkeycloak-proxy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
HTTPD_DOCKER_IMAGE=${HTTPD_DOCKER_IMAGE:-httpd:latest}
24

35
ensure_devkeycloak-proxy() {

selenium/bin/components/forward-proxy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
HTTPD_DOCKER_IMAGE=${HTTPD_DOCKER_IMAGE:-httpd:latest}
24

35
ensure_forward-proxy() {

selenium/bin/components/other-rabbitmq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ start_local_other_rabbitmq() {
6969

7070
print "> EFFECTIVE RABBITMQ_CONFIG_FILE: /tmp/other$MOUNT_RABBITMQ_CONF"
7171
cp ${RABBITMQ_CONFIG_DIR}/enabled_plugins /tmp/other/etc/rabbitmq/
72-
RABBITMQ_ENABLED_PLUGINS=`cat /tmp/other/etc/rabbitmq/enabled_plugins | tr -d " \t\n\r" | awk -F'[][]' '{print $2}'`
72+
RABBITMQ_ENABLED_PLUGINS=$(cat /tmp/other/etc/rabbitmq/enabled_plugins | tr -d " \t\n\r" | awk -F'[][]' '{print $2}')
7373
print "> EFFECTIVE PLUGINS: $RABBITMQ_ENABLED_PLUGINS"
7474

7575
${BIN_DIR}/gen-advanced-config "${PROFILES_FOR_OTHER}" ${RABBITMQ_CONFIG_DIR} $OTHER_ENV_FILE /tmp/other$MOUNT_ADVANCED_CONFIG

selenium/bin/components/prodkeycloak-proxy

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ start_prodkeycloak-proxy() {
3030

3131
MOUNT_HTTPD_CONFIG_DIR=$CONF_DIR/httpd
3232

33-
mkdir -p "$MOUNT_HTTPD_CONFIG_DIR"
34-
"${BIN_DIR}/gen-httpd-conf" "${HTTPD_CONFIG_DIR}" "$ENV_FILE" "$MOUNT_HTTPD_CONFIG_DIR/httpd.conf"
33+
mkdir -p $MOUNT_HTTPD_CONFIG_DIR
34+
${BIN_DIR}/gen-httpd-conf" "${HTTPD_CONFIG_DIR} $ENV_FILE $MOUNT_HTTPD_CONFIG_DIR/httpd.conf
3535
print "> EFFECTIVE HTTPD_CONFIG_FILE: $MOUNT_HTTPD_CONFIG_DIR/httpd.conf"
36-
cp "${HTTPD_CONFIG_DIR}/.htpasswd" "$MOUNT_HTTPD_CONFIG_DIR"
36+
cp ${HTTPD_CONFIG_DIR}/.htpasswd $MOUNT_HTTPD_CONFIG_DIR
3737

3838
docker run \
3939
--detach \
4040
--name prodkeycloak-proxy \
41-
--net "${DOCKER_NETWORK}" \
41+
--net ${DOCKER_NETWORK} \
4242
--publish 9091:9091 \
4343
--mount "type=bind,source=${MOUNT_HTTPD_CONFIG_DIR},target=/usr/local/apache2/conf" \
44-
"${HTTPD_DOCKER_IMAGE}"
44+
${HTTPD_DOCKER_IMAGE}
4545

4646
wait_for_message prodkeycloak-proxy "initializing worker proxy:forward local"
4747
end "prodkeycloak-proxy is ready"

selenium/bin/components/proxy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
HTTPD_DOCKER_IMAGE=${HTTPD_DOCKER_IMAGE:-httpd:latest}
24

35
ensure_proxy() {

selenium/bin/components/rabbitmq

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4-
53

64
init_rabbitmq() {
75
RABBITMQ_CONFIG_DIR=${TEST_CONFIG_DIR}
@@ -70,7 +68,7 @@ start_local_rabbitmq() {
7068

7169
print "> EFFECTIVE RABBITMQ_CONFIG_FILE: /tmp$MOUNT_RABBITMQ_CONF"
7270
cp ${RABBITMQ_CONFIG_DIR}/enabled_plugins /tmp/etc/rabbitmq/
73-
RABBITMQ_ENABLED_PLUGINS=`cat /tmp/etc/rabbitmq/enabled_plugins | tr -d " \t\n\r" | awk -F'[][]' '{print $2}'`
71+
RABBITMQ_ENABLED_PLUGINS=$(cat /tmp/etc/rabbitmq/enabled_plugins | tr -d " \t\n\r" | awk -F'[][]' '{print $2}')
7472
print "> EFFECTIVE PLUGINS: $RABBITMQ_ENABLED_PLUGINS"
7573

7674
${BIN_DIR}/gen-advanced-config "${PROFILES}" ${RABBITMQ_CONFIG_DIR} $ENV_FILE /tmp$MOUNT_ADVANCED_CONFIG

0 commit comments

Comments
 (0)