1+ import org.elasticsearch.gradle.Architecture
2+
13Project idpFixtureProject = xpackProject(" test:idp-fixture" )
24
35apply 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
1517String outputDir = " ${ project.buildDir} /generated-resources/${ project.name} "
1618def 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
4450testClusters. matching { it. name == " integTest" }. configureEach {
4551 testDistribution = ' DEFAULT'
0 commit comments