1
+ import org.elasticsearch.gradle.Architecture
2
+
1
3
Project idpFixtureProject = xpackProject(" test:idp-fixture" )
2
4
3
5
apply plugin : ' elasticsearch.testclusters'
@@ -9,21 +11,21 @@ dependencies {
9
11
testImplementation(testArtifact(project(xpackModule(' core' ))))
10
12
testImplementation " com.google.jimfs:jimfs:${ versions.jimfs} "
11
13
}
12
- testFixtures. useFixture " :x-pack:test:idp-fixture"
13
14
15
+ testFixtures. useFixture " :x-pack:test:idp-fixture"
14
16
15
17
String outputDir = " ${ project.buildDir} /generated-resources/${ project.name} "
16
18
def copyIdpFiles = tasks. register(" copyIdpFiles" , Copy ) {
17
19
from idpFixtureProject. files(' idp/shibboleth-idp/credentials/idp-browser.pem' , ' idp/shibboleth-idp/metadata/idp-metadata.xml' ,
18
20
' idp/shibboleth-idp/credentials/sp-signing.key' , ' idp/shibboleth-idp/credentials/sp-signing.crt' );
19
21
into outputDir
20
22
}
21
- project. sourceSets. test. output. dir(outputDir, builtBy : copyIdpFiles)
22
23
23
- tasks. register(" setupPorts" ) {
24
+ def setupPorts = tasks. register(" setupPorts" ) {
24
25
dependsOn copyIdpFiles, idpFixtureProject. postProcessFixture
25
26
// 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 }
27
29
doLast {
28
30
String portString = idpFixtureProject. postProcessFixture. ext. " test.fixtures.shibboleth-idp.tcp.4443"
29
31
int ephemeralPort = Integer . valueOf(portString)
@@ -39,7 +41,11 @@ tasks.register("setupPorts") {
39
41
}
40
42
}
41
43
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
+ }
43
49
44
50
testClusters. matching { it. name == " integTest" }. configureEach {
45
51
testDistribution = ' DEFAULT'
0 commit comments