Skip to content

Commit

Permalink
Remove compile-time dependency on test fixtures (#43651)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira authored Jun 26, 2019
1 parent 0d05ec4 commit 80fbe9c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions x-pack/qa/kerberos-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ testClusters.integTest {
user username: "test_kibana_user", password: "x-pack-test-password", role: "kibana_system"
}

task copyKeytabToGeneratedResources(type: Copy) {
from project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("peppa", "peppa.keytab")
into "$buildDir/generated-resources/keytabs"
dependsOn project(':test:fixtures:krb5kdc-fixture').postProcessFixture
}

String realm = "BUILD.ELASTIC.CO"
integTest.runner {
Path peppaKeytab = Paths.get("${project.buildDir}", "generated-resources", "keytabs", "peppa.keytab")
Expand All @@ -57,12 +63,5 @@ integTest.runner {
"-Djava.security.krb5.conf=${project(':test:fixtures:krb5kdc-fixture').ext.krb5Conf("peppa")}",
"-Dsun.security.krb5.debug=true"
])
classpath += copyKeytabToGeneratedResources.outputs.files
}

def generatedResources = "$buildDir/generated-resources/keytabs"
task copyKeytabToGeneratedResources(type: Copy) {
from project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("peppa", "peppa.keytab")
into generatedResources
dependsOn project(':test:fixtures:krb5kdc-fixture').postProcessFixture
}
project.sourceSets.test.output.dir(generatedResources, builtBy:copyKeytabToGeneratedResources)

0 comments on commit 80fbe9c

Please sign in to comment.