Skip to content

Commit d384f0e

Browse files
committed
Use constant for no_proxy key
1 parent f3d8e7d commit d384f0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/selenium/src/main/java/org/testcontainers/containers/BrowserWebDriverContainer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public class BrowserWebDriverContainer<SELF extends BrowserWebDriverContainer<SE
4444
private static final int SELENIUM_PORT = 4444;
4545
private static final int VNC_PORT = 5900;
4646

47+
private static final String NO_PROXY_KEY = "no_proxy";
48+
4749
@Nullable
4850
private DesiredCapabilities desiredCapabilities;
4951
private boolean customImageNameIsSet = false;
@@ -132,8 +134,8 @@ protected void configure() {
132134
addExposedPorts(SELENIUM_PORT, VNC_PORT);
133135
addEnv("TZ", timeZone);
134136

135-
if (!getEnvMap().containsKey("no_proxy")) {
136-
addEnv("no_proxy", "localhost");
137+
if (!getEnvMap().containsKey(NO_PROXY_KEY)) {
138+
addEnv(NO_PROXY_KEY, "localhost");
137139
}
138140

139141
setCommand("/opt/bin/entry_point.sh");

0 commit comments

Comments
 (0)