Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 65a97e4

Browse files
committed
bug(chart): SE_NODE_GRID_URL missing port when hostname is selenium-grid.local
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 2aa675e commit 65a97e4

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

charts/selenium-grid/configs/node/nodeProbe.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,27 @@ replace_localhost_by_service_name
2727
if curl -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status -o /tmp/nodeProbe${ID}; then
2828
NODE_ID=$(jq -r '.value.node.nodeId' /tmp/nodeProbe${ID})
2929
NODE_STATUS=$(jq -r '.value.node.availability' /tmp/nodeProbe${ID})
30+
if [ -n "${NODE_ID}" ]; then
31+
echo "Node responds the ID: ${NODE_ID} with status: ${NODE_STATUS}"
32+
else
33+
echo "Wait for the Node to report its status"
34+
exit 1
35+
fi
3036

3137
curl -sfk "${SE_GRID_URL}/status" -o /tmp/gridProbe${ID}
3238
GRID_NODE_ID=$(jq -e ".value.nodes[].id|select(. == \"${NODE_ID}\")" /tmp/gridProbe${ID} | tr -d '"' || true)
39+
if [ -n "${GRID_NODE_ID}" ]; then
40+
echo "Grid responds a matched Node ID: ${GRID_NODE_ID}"
41+
fi
3342

3443
if [ "${NODE_STATUS}" = "UP" ] && [ -n "${NODE_ID}" ] && [ -n "${GRID_NODE_ID}" ] && [ "${NODE_ID}" = "${GRID_NODE_ID}" ]; then
35-
echo "Node ID: ${NODE_ID} with status: ${NODE_STATUS}"
36-
echo "Found in the Grid a matched Node ID: ${GRID_NODE_ID}"
44+
echo "Node ID: ${NODE_ID} is found in the Grid. The registration is successful."
3745
exit 0
3846
else
3947
echo "Node ID: ${NODE_ID} is not found in the Grid. The registration could be in progress."
4048
exit 1
4149
fi
4250
else
51+
echo "Wait for the Node to report its status"
4352
exit 1
4453
fi

charts/selenium-grid/templates/_helpers.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@ Get the url of the grid. If the external url can be figured out from the ingress
490490
{{- if .Values.ingress.enabled -}}
491491
{{- if or (ne (.Values.ingress.ports.http | toString) "80") (ne (.Values.ingress.ports.https | toString) "443") -}}
492492
{{- $port = printf ":%s" (ternary (.Values.ingress.ports.http | toString) (.Values.ingress.ports.https | toString) (eq (include "seleniumGrid.url.schema" .) "http")) -}}
493+
{{- else if and .Values.ingress.hostname (eq (tpl .Values.ingress.hostname $) "selenium-grid.local") }}
494+
{{- $port = $port -}}
493495
{{- else -}}
494496
{{- $port = "" -}}
495497
{{- end -}}

tests/charts/ci/base-auth-ingress-values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ hub:
3434
value: "15"
3535
- name: SE_REJECT_UNSUPPORTED_CAPS
3636
value: "false"
37-
- name: SE_OPTS
38-
value: "--max-threads 12"
3937

4038
components:
4139
subPath: *gridAppRoot

0 commit comments

Comments
 (0)