Skip to content

Commit fca22ff

Browse files
authored
Docker: Fix get rid of warning messages (#3071)
If basic auth isn't configured the node containers log Warning: The provided HTTP header '' does not look like a header? every second. Signed-off-by: Mårten Svantesson <marten.svantesson@ticket.se>
1 parent 79531c8 commit fca22ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Base/check-grid.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ set -e
55

66
HOST="localhost"
77
PORT="4444"
8+
declare -a extra_args
89
if [ -n "${SE_ROUTER_USERNAME}" ] && [ -n "${SE_ROUTER_PASSWORD}" ]; then
910
BASIC_AUTH="$(echo -en "${SE_ROUTER_USERNAME}:${SE_ROUTER_PASSWORD}" | base64 -w0)"
10-
BASIC_AUTH="Authorization: Basic ${BASIC_AUTH}"
11+
extra_args=(-H "Authorization: Basic ${BASIC_AUTH}")
1112
fi
1213

1314
echoerr() { echo "$@" 1>&2; }
@@ -30,4 +31,4 @@ while [[ $# -gt 0 ]]; do
3031
esac
3132
done
3233

33-
curl -skSL --noproxy "*" -H "${BASIC_AUTH}" ${SE_SERVER_PROTOCOL:-"http"}://${HOST}:${PORT}/wd/hub/status | jq -r '.value.ready' | grep -q "true" || exit 1
34+
curl -skSL --noproxy "*" "${extra_args[@]}" ${SE_SERVER_PROTOCOL:-"http"}://${HOST}:${PORT}/wd/hub/status | jq -r '.value.ready' | grep -q "true" || exit 1

0 commit comments

Comments
 (0)