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

Commit

Permalink
feat: Add ENV var for CLI config --reject-unsupported-caps (SeleniumH…
Browse files Browse the repository at this point in the history
…Q#2127)

Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 authored Feb 6, 2024
1 parent a065ede commit 53be542
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ USER ${SEL_UID}:${SEL_GID}

# Boolean value, maps "--bind-host"
ENV SE_BIND_HOST false
# Boolean value, maps "--reject-unsupported-caps"
ENV SE_REJECT_UNSUPPORTED_CAPS false

# A too high maximum number of file descriptors (with the default value
# inherited from the docker host) can cause issues with some of our tools:
Expand Down
5 changes: 5 additions & 0 deletions Distributor/start-selenium-grid-distributor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ if [ ! -z "$SE_REGISTRATION_SECRET" ]; then
SE_OPTS="$SE_OPTS --registration-secret ${SE_REGISTRATION_SECRET}"
fi

if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then
echo "Appending Selenium options: --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
fi

EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
Expand Down
5 changes: 5 additions & 0 deletions Hub/start-selenium-grid-hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ if [ ! -z "$SE_DISABLE_UI" ]; then
SE_OPTS="$SE_OPTS --disable-ui ${SE_DISABLE_UI}"
fi

if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then
echo "Appending Selenium options: --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
fi

EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
Expand Down
5 changes: 5 additions & 0 deletions Standalone/start-selenium-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ if [ ! -z "$SE_JAVA_SSL_TRUST_STORE" ]; then
SE_JAVA_OPTS="$SE_JAVA_OPTS -Djdk.internal.httpclient.disableHostnameVerification=${SE_JAVA_DISABLE_HOSTNAME_VERIFICATION:-true}"
fi

if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then
echo "Appending Selenium options: --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
fi

/opt/bin/generate_config

echo "Selenium Grid Standalone configuration: "
Expand Down
4 changes: 4 additions & 0 deletions tests/charts/ci/base-tracing-values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
hub:
extraEnvironmentVariables:
- name: SE_REJECT_UNSUPPORTED_CAPS
value: "false"
- name: SE_ENABLE_TRACING
value: "true"
- name: SE_JAVA_OPTS
value: "-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://{{ .Release.Name }}-jaeger-all-in-one-headless:14250 -Dotel.resource.attributes=service.name=selenium -Dotel.java.global-autoconfigure.enabled=true"

components:
extraEnvironmentVariables:
- name: SE_REJECT_UNSUPPORTED_CAPS
value: "false"
- name: SE_ENABLE_TRACING
value: "true"
- name: SE_JAVA_OPTS
Expand Down

0 comments on commit 53be542

Please sign in to comment.