Skip to content

Commit b75e36c

Browse files
authored
Docker: set/unset stereotype via env var SE_NODE_PLATFORM_NAME (#2525)
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent 8e8f074 commit b75e36c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NodeBase/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ ENV LANG_WHICH=${LANG_WHICH} \
4848
# Setting Selenium Manager to work offline
4949
SE_OFFLINE=true \
5050
SE_NODE_BROWSER_VERSION="stable" \
51+
SE_NODE_PLATFORM_NAME="Linux" \
5152
#============================
5253
# Some configuration options
5354
#============================

NodeBase/generate_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ echo "max-sessions = ${SE_NODE_MAX_CONCURRENCY:-${SE_NODE_MAX_SESSIONS}}
5555
if [ -f /opt/selenium/browser_name ]; then
5656
SE_NODE_BROWSER_NAME=$(cat /opt/selenium/browser_name)
5757
fi
58-
if [ -f /opt/selenium/browser_version ] && [ "${SE_NODE_BROWSER_VERSION}" = "stable" ]; then
58+
if [ -f /opt/selenium/browser_version ] && [ "${SE_NODE_BROWSER_VERSION,,}" = "stable" ]; then
5959
SE_NODE_BROWSER_VERSION=$(short_version $(cat /opt/selenium/browser_version))
6060
fi
6161
if [ -f /opt/selenium/browser_binary_location ] && [ -z "${SE_BROWSER_BINARY_LOCATION}" ]; then
@@ -64,7 +64,7 @@ fi
6464

6565
# 'browserName' is mandatory for default stereotype
6666
if [[ -z "${SE_NODE_STEREOTYPE}" ]] && [[ -n "${SE_NODE_BROWSER_NAME}" ]]; then
67-
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\", ${SE_BROWSER_BINARY_LOCATION}, \"se:containerName\": \"${SE_NODE_CONTAINER_NAME}\"}"
67+
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"${SE_NODE_PLATFORM_NAME}\", ${SE_BROWSER_BINARY_LOCATION}, \"se:containerName\": \"${SE_NODE_CONTAINER_NAME}\"}"
6868
else
6969
SE_NODE_STEREOTYPE="${SE_NODE_STEREOTYPE}"
7070
fi

0 commit comments

Comments
 (0)