From 03784f957f5b3683ec08307c671e49a23a56fdc1 Mon Sep 17 00:00:00 2001 From: Bill Smith Date: Mon, 1 Jul 2019 10:32:59 -0700 Subject: [PATCH] SHIBUI-1281 Simple changes to get tests to work again. WIP. --- backend/build.gradle | 4 ++-- .../tier/shibboleth/admin/ui/SeleniumSIDETest.groovy | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/build.gradle b/backend/build.gradle index 805f77e3e..40a87ada6 100644 --- a/backend/build.gradle +++ b/backend/build.gradle @@ -317,6 +317,6 @@ dockerRun { image 'unicon/shibui' ports '10101:8080' daemonize true - command '--spring.profiles.include=very-dangerous,dev' + command '--spring.profiles.include=very-dangerous,dev', '--shibui.default-password={noop}password' clean true -} \ No newline at end of file +} diff --git a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy index 399edde0d..aae8797f6 100644 --- a/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy +++ b/backend/src/integration/groovy/edu/internet2/tier/shibboleth/admin/ui/SeleniumSIDETest.groovy @@ -14,7 +14,7 @@ import spock.lang.Unroll import java.nio.file.Paths //TODO: make config configurable -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = [ShibbolethUiApplication]) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT, classes = [ShibbolethUiApplication]) @ActiveProfiles(['dev']) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD, methodMode = DirtiesContext.MethodMode.AFTER_METHOD) class SeleniumSIDETest extends Specification { @@ -60,7 +60,11 @@ class SeleniumSIDETest extends Specification { it.remoteUrl = 'http://selenium-hub:4444/wd/hub' it.remoteBrowser = 'firefox' } - it.baseurl = "http://jenkins:${this.randomPort}" + if (System.properties.getProperty('selenium.host')) { + it.baseurl = System.properties.getProperty('selenium.host') + } else { + it.baseurl = "http://jenkins:${this.randomPort}" + } it } def runner = new Runner()