openvidu-test-e2e: provide browser versions as env variables

pull/664/head
pabloFuente 2021-11-04 15:10:28 +01:00
parent 61bd4cf2fc
commit de46b5ce4d
2 changed files with 29 additions and 18 deletions

View File

@ -219,9 +219,13 @@ def openViduE2ETest(mediaServerImage) {
env.mediaServerImage = mediaServerImage env.mediaServerImage = mediaServerImage
env.openviduProLicense = "${OPENVIDU_PRO_LICENSE}" env.openviduProLicense = "${OPENVIDU_PRO_LICENSE}"
env.openviduProLicenseApi = "${OPENVIDU_PRO_LICENSE_API}" env.openviduProLicenseApi = "${OPENVIDU_PRO_LICENSE_API}"
env.chromeVersion = "${CHROME_VERSION}"
env.firefoxVersion = "${FIREFOX_VERSION}"
env.operaVersion = "${OPERA_VERSION}"
env.edgeVersion = "${EDGE_VERSION}"
sh(script: '''#!/bin/bash -xe sh(script: '''#!/bin/bash -xe
cd openvidu/openvidu-test-e2e cd openvidu/openvidu-test-e2e
ENV_VARS="-DMEDIA_SERVER_IMAGE=${mediaServerImage} -Dtest=OpenViduTestAppE2eTest -DAPP_URL=https://172.17.0.1:4200/ -DOPENVIDU_URL=https://172.17.0.1:4443/ -DREMOTE_URL_CHROME=http://172.17.0.1:6666/wd/hub/ -DREMOTE_URL_FIREFOX=http://172.17.0.1:6667/wd/hub/ -DREMOTE_URL_OPERA=http://172.17.0.1:6668/wd/hub/ -DREMOTE_URL_EDGE=http://172.17.0.1:6669/wd/hub/ -DEXTERNAL_CUSTOM_LAYOUT_URL=http://172.17.0.1:5555 -DEXTERNAL_CUSTOM_LAYOUT_PARAMS=sessionId,CUSTOM_LAYOUT_SESSION,secret,MY_SECRET" ENV_VARS="-DMEDIA_SERVER_IMAGE=${mediaServerImage} -DCHROME_VERSION=${chromeVersion} -DFIREFOX_VERSION=${firefoxVersion} -DOPERA_VERSION=${operaVersion} -DEDGE_VERSION=${edgeVersion} -Dtest=OpenViduTestAppE2eTest -DAPP_URL=https://172.17.0.1:4200/ -DOPENVIDU_URL=https://172.17.0.1:4443/ -DREMOTE_URL_CHROME=http://172.17.0.1:6666/wd/hub/ -DREMOTE_URL_FIREFOX=http://172.17.0.1:6667/wd/hub/ -DREMOTE_URL_OPERA=http://172.17.0.1:6668/wd/hub/ -DREMOTE_URL_EDGE=http://172.17.0.1:6669/wd/hub/ -DEXTERNAL_CUSTOM_LAYOUT_URL=http://172.17.0.1:5555 -DEXTERNAL_CUSTOM_LAYOUT_PARAMS=sessionId,CUSTOM_LAYOUT_SESSION,secret,MY_SECRET"
if [[ $mediaServerImage == *"openvidu/mediasoup-controller"* ]]; then if [[ $mediaServerImage == *"openvidu/mediasoup-controller"* ]]; then
ENV_VARS+=" -DOPENVIDU_PRO_LICENSE=${openviduProLicense} -DOPENVIDU_PRO_LICENSE_API=${openviduProLicenseApi}" ENV_VARS+=" -DOPENVIDU_PRO_LICENSE=${openviduProLicense} -DOPENVIDU_PRO_LICENSE_API=${openviduProLicenseApi}"
fi fi

View File

@ -227,6 +227,30 @@ public class AbstractOpenViduTestAppE2eTest {
} }
log.info("Using media server {} for e2e tests", MEDIA_SERVER_IMAGE); log.info("Using media server {} for e2e tests", MEDIA_SERVER_IMAGE);
String chromeVersion = System.getProperty("CHROME_VERSION");
if (chromeVersion != null && !chromeVersion.isBlank()) {
CHROME_VERSION = chromeVersion;
}
log.info("Using Chrome {}", CHROME_VERSION);
String firefoxVersion = System.getProperty("FIREFOX_VERSION");
if (firefoxVersion != null && !firefoxVersion.isBlank()) {
FIREFOX_VERSION = firefoxVersion;
}
log.info("Using Firefox {}", FIREFOX_VERSION);
String operaVersion = System.getProperty("OPERA_VERSION");
if (operaVersion != null && !operaVersion.isBlank()) {
OPERA_VERSION = operaVersion;
}
log.info("Using Opera {}", OPERA_VERSION);
String edgeVersion = System.getProperty("EDGE_VERSION");
if (edgeVersion != null && !edgeVersion.isBlank()) {
EDGE_VERSION = edgeVersion;
}
log.info("Using Edge {}", EDGE_VERSION);
String openviduProLicense = System.getProperty("OPENVIDU_PRO_LICENSE"); String openviduProLicense = System.getProperty("OPENVIDU_PRO_LICENSE");
if (openviduProLicense != null) { if (openviduProLicense != null) {
OPENVIDU_PRO_LICENSE = openviduProLicense; OPENVIDU_PRO_LICENSE = openviduProLicense;
@ -236,23 +260,6 @@ public class AbstractOpenViduTestAppE2eTest {
if (openviduProLicenseApi != null) { if (openviduProLicenseApi != null) {
OPENVIDU_PRO_LICENSE_API = openviduProLicenseApi; OPENVIDU_PRO_LICENSE_API = openviduProLicenseApi;
} }
String chromeVersion = System.getProperty("CHROME_VERSION");
if (chromeVersion != null) {
CHROME_VERSION = chromeVersion;
}
String firefoxVersion = System.getProperty("FIREFOX_VERSION");
if (firefoxVersion != null) {
FIREFOX_VERSION = firefoxVersion;
}
String operaVersion = System.getProperty("OPERA_VERSION");
if (operaVersion != null) {
OPERA_VERSION = operaVersion;
}
String edgeVersion = System.getProperty("EDGE_VERSION");
if (edgeVersion != null) {
EDGE_VERSION = edgeVersion;
}
} }
protected MyUser setupBrowser(String browser) { protected MyUser setupBrowser(String browser) {