Skip 'setupPorts' tasks when Docker is unavailable (#52679)

This commit is contained in:
Mark Vieira 2020-02-22 18:17:15 -08:00
parent 02cb5b6c0e
commit 72a2d0f9d8
No known key found for this signature in database
GPG Key ID: CA947EF7E6D4B105
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ testFixtures.useFixture ":x-pack:test:idp-fixture", "oidc-provider"
String ephemeralPort;
task setupPorts {
// Don't attempt to get ephemeral ports when Docker is not available
onlyIf { idpFixtureProject.postProcessFixture.enabled }
onlyIf { idpFixtureProject.postProcessFixture.state.skipped == false }
dependsOn idpFixtureProject.postProcessFixture
doLast {
ephemeralPort = idpFixtureProject.postProcessFixture.ext."test.fixtures.oidc-provider.tcp.8080"

View File

@ -22,7 +22,7 @@ project.sourceSets.test.output.dir(outputDir, builtBy: copyIdpFiles)
task setupPorts {
dependsOn copyIdpFiles, idpFixtureProject.postProcessFixture
// Don't attempt to get ephemeral ports when Docker is not available
onlyIf { idpFixtureProject.postProcessFixture.enabled }
onlyIf { idpFixtureProject.postProcessFixture.state.skipped == false }
doLast {
String portString = idpFixtureProject.postProcessFixture.ext."test.fixtures.shibboleth-idp.tcp.4443"
int ephemeralPort = Integer.valueOf(portString)