This is an automated email from the ASF dual-hosted git repository.
rawlin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new 8141a7f TP: Fix tp test in docker (#3581)
8141a7f is described below
commit 8141a7f6cc07e736ecb3e6445bf93e0155621345
Author: Dan Kirkwood <[email protected]>
AuthorDate: Thu May 16 16:25:59 2019 -0700
TP: Fix tp test in docker (#3581)
* trying to fix webdriver-manager and chrome
* fix TP test dockerfile
---
.../traffic_portal_integration_test/Dockerfile | 27 +++++++++++-----------
traffic_portal/test/end_to_end/conf.js | 6 ++---
2 files changed, 16 insertions(+), 17 deletions(-)
diff --git
a/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
b/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
index a7d39d9..71749bf 100644
--- a/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
@@ -49,25 +49,26 @@ RUN ls -lah /lang/traffic_portal/test/end_to_end
RUN sed -i "s/baseUrl: 'https:\/\/localhost:4443/baseUrl:
'https:\/\/trafficportal.infra.ciab.test:443/"
/lang/traffic_portal/test/end_to_end/conf.js
RUN sed -i "s/baseUrl: 'https:\/\/localhost:4443/baseUrl:
'https:\/\/trafficportal.infra.ciab.test:443/"
/lang/traffic_portal/test/end_to_end/login/conf.js
-RUN export junit_conf_jasmine=" \
- onPrepare: function() { \
- var jasmineReporters = require('jasmine-reporters'); \
- jasmine.getEnv().addReporter( \
- new
jasmineReporters.JUnitXmlReporter({savePath:'/portaltestresults', filePrefix:
'portaltestresults', consolidateAll:true}) \
- ); \
- }, \
-" && perl -p -i -e 's/(\s*suites)/$ENV{junit_conf_jasmine}\1/g' conf.js
+RUN export junit_conf_jasmine="\n\
+ onPrepare: function() {\n\
+ var jasmineReporters = require('jasmine-reporters');\n\
+ jasmine.getEnv().addReporter(\n\
+ new
jasmineReporters.JUnitXmlReporter({savePath:'/portaltestresults', filePrefix:
'portaltestresults', consolidateAll:true})\n\
+ );\n\
+ },\n\
+" && perl -p -i -e 'BEGIN{ ($e=$ENV{junit_conf_jasmine}) =~ s/\\n/\n/g } if
(/^\s*suites\b/) {print $e}' conf.js
-RUN export junit_conf_chrome=", \
- 'chromeOptions': { \
- 'args': ['--headless', '--disable-gpu', '--no-sandbox',
'--ignore-certificate-errors'] \
- } \
-" && perl -p -i -e
's/(\s*'"'"'browserName'"'"':\s*'"'"'chrome'"'"')/\1\n$ENV{junit_conf_chrome}/g'
conf.js
+RUN export junit_conf_chrome="\
+ chromeOptions: {\n\
+ args: ['--headless', '--disable-gpu', '--no-sandbox',
'--ignore-certificate-errors', '--disable-extensions', '--whitelisted-ips'] \n\
+ },\n\
+" && perl -p -i -e 'BEGIN{ ($e=$ENV{junit_conf_chrome}) =~ s/\\n/\n/g } if
(/\bbrowserName\b/../}/) {print $e; $e=""}' conf.js
# debug
RUN cat conf.js
RUN cat login/conf.js
+RUN webdriver-manager clean
RUN webdriver-manager update
COPY ./infrastructure/cdn-in-a-box/traffic_portal_integration_test/run.sh
/lang/traffic_portal/test/end_to_end/
diff --git a/traffic_portal/test/end_to_end/conf.js
b/traffic_portal/test/end_to_end/conf.js
index 091d17c..0776984 100644
--- a/traffic_portal/test/end_to_end/conf.js
+++ b/traffic_portal/test/end_to_end/conf.js
@@ -22,11 +22,9 @@ exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
baseUrl: 'https://localhost:4443',
getPageTimeout: 30000,
+
capabilities: {
- browserName: 'chrome',
- chromeOptions: {
- args: ['--no-sandbox']
- },
+ 'browserName': 'chrome'
},
params: {
adminUser: 'admin',