Skip to content

Commit 75d2765

Browse files
authored
Disable Docker test fixtures that don't support aarch64 (elastic#71377)
1 parent 56dbfa8 commit 75d2765

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

x-pack/qa/oidc-op-tests/build.gradle

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.elasticsearch.gradle.Architecture
2+
13
Project idpFixtureProject = xpackProject("test:idp-fixture")
24

35
apply plugin: 'elasticsearch.testclusters'
@@ -20,4 +22,9 @@ tasks.named("processTestResources").configure {
2022
.files(
2123
'src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/testnode_ec.crt'
2224
)
23-
}
25+
}
26+
27+
tasks.named("integTest").configure {
28+
// OpenID Connect fixture does not support aarm64
29+
onlyIf { Architecture.current() == Architecture.X64 }
30+
}

x-pack/qa/saml-idp-tests/build.gradle

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.elasticsearch.gradle.Architecture
2+
13
Project idpFixtureProject = xpackProject("test:idp-fixture")
24

35
apply plugin: 'elasticsearch.testclusters'
@@ -9,21 +11,21 @@ dependencies {
911
testImplementation(testArtifact(project(xpackModule('core'))))
1012
testImplementation "com.google.jimfs:jimfs:${versions.jimfs}"
1113
}
12-
testFixtures.useFixture ":x-pack:test:idp-fixture"
1314

15+
testFixtures.useFixture ":x-pack:test:idp-fixture"
1416

1517
String outputDir = "${project.buildDir}/generated-resources/${project.name}"
1618
def copyIdpFiles = tasks.register("copyIdpFiles", Copy) {
1719
from idpFixtureProject.files('idp/shibboleth-idp/credentials/idp-browser.pem', 'idp/shibboleth-idp/metadata/idp-metadata.xml',
1820
'idp/shibboleth-idp/credentials/sp-signing.key', 'idp/shibboleth-idp/credentials/sp-signing.crt');
1921
into outputDir
2022
}
21-
project.sourceSets.test.output.dir(outputDir, builtBy: copyIdpFiles)
2223

23-
tasks.register("setupPorts") {
24+
def setupPorts = tasks.register("setupPorts") {
2425
dependsOn copyIdpFiles, idpFixtureProject.postProcessFixture
2526
// Don't attempt to get ephemeral ports when Docker is not available
26-
onlyIf { idpFixtureProject.postProcessFixture.state.skipped == false }
27+
// Also, shibboleth fixture is not available on aarch64
28+
onlyIf { idpFixtureProject.postProcessFixture.state.skipped == false && Architecture.current() == Architecture.X64 }
2729
doLast {
2830
String portString = idpFixtureProject.postProcessFixture.ext."test.fixtures.shibboleth-idp.tcp.4443"
2931
int ephemeralPort = Integer.valueOf(portString)
@@ -39,7 +41,11 @@ tasks.register("setupPorts") {
3941
}
4042
}
4143

42-
tasks.named("integTest").configure {dependsOn "setupPorts" }
44+
project.sourceSets.test.output.dir(outputDir, builtBy: [copyIdpFiles, setupPorts])
45+
46+
tasks.named("integTest").configure {
47+
onlyIf { idpFixtureProject.postProcessFixture.state.skipped == false && Architecture.current() == Architecture.X64 }
48+
}
4349

4450
testClusters.matching { it.name == "integTest" }.configureEach {
4551
testDistribution = 'DEFAULT'

0 commit comments

Comments
 (0)