Skip to content

Commit 182296e

Browse files
Use proxy also in the management ui
1 parent b612b50 commit 182296e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export FORWARD_PROXY_URL=http://forward-proxy:9092
1+
export FORWARD_PROXY_URL=forward-proxy:9092
22
export OAUTH_PROVIDER_URL=${KEYCLOAK_URL}
33
export OAUTH_PROVIDER_CA_CERT=${KEYCLOAK_CA_CERT}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export FORWARD_PROXY_URL=http://forward-proxy:9092
1+
export FORWARD_PROXY_URL=forward-proxy:9092
22
export OAUTH_PROVIDER_URL=${KEYCLOAK_URL}
33
export OAUTH_PROVIDER_CA_CERT=${KEYCLOAK_CA_CERT}

selenium/test/utils.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ const XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest
33
const fsp = fs.promises
44
const path = require('path')
55
const { By, Key, until, Builder, logging, Capabilities } = require('selenium-webdriver')
6+
const proxy = require('selenium-webdriver/proxy')
67
require('chromedriver')
78
const UAALoginPage = require('./pageobjects/UAALoginPage')
89
const KeycloakLoginPage = require('./pageobjects/KeycloakLoginPage')
910
const assert = require('assert')
1011

1112
const uaaUrl = process.env.UAA_URL || 'http://localhost:8080'
1213
const baseUrl = randomly_pick_baseurl(process.env.RABBITMQ_URL) || 'http://localhost:15672/'
14+
const proxyUrl = process.env.FORWARD_PROXY_URL
1315
const hostname = process.env.RABBITMQ_HOSTNAME || 'localhost'
1416
const runLocal = String(process.env.RUN_LOCAL).toLowerCase() != 'false'
1517
const seleniumUrl = process.env.SELENIUM_URL || 'http://selenium:4444'
@@ -64,10 +66,15 @@ module.exports = {
6466
"--disable-search-engine-choice-screen"
6567
]
6668
});
67-
driver = builder
69+
70+
builder = builder
6871
.forBrowser('chrome')
6972
.withCapabilities(chromeCapabilities)
70-
.build()
73+
if (proxyUrl) {
74+
console.log("Using proxy " + proxyUrl)
75+
builder = builder.setProxy(proxy.manual({https: proxyUrl}))
76+
}
77+
driver = builder.build()
7178
driver.manage().setTimeouts( { pageLoad: 35000 } )
7279
return driver
7380
},

0 commit comments

Comments
 (0)