Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TestArtifact plugin instead of custom test jar tasks #75931

Merged
merged 3 commits into from
Aug 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions x-pack/plugin/sql/qa/jdbc/security/build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
import org.elasticsearch.gradle.internal.test.RestIntegTestTask

apply plugin: 'elasticsearch.internal-test-artifact'

dependencies {
testImplementation project(':x-pack:plugin:core')
}

Project mainProject = project

configurations.create('testArtifacts')

TaskProvider testJar = tasks.register("testJar", Jar) {
appendix 'test'
from sourceSets.test.output
}

artifacts {
testArtifacts testJar
}

subprojects {
// Use tests from the root security qa project in subprojects
configurations.create('testArtifacts')
configurations.create('testArtifacts').transitive(false)

dependencies {
testImplementation project(":x-pack:plugin:core")
testArtifacts project(path: mainProject.path, configuration: 'testArtifacts')
testArtifacts testArtifact(project(mainProject.path))
}

testClusters.all {
Expand Down
17 changes: 4 additions & 13 deletions x-pack/plugin/sql/qa/server/security/build.gradle
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
apply plugin: 'elasticsearch.internal-test-artifact'

dependencies {
testImplementation project(':x-pack:plugin:core')
}

Project mainProject = project

configurations.create('testArtifacts')

TaskProvider testJar = tasks.register("testJar", Jar) {
appendix 'test'
from sourceSets.test.output
}

artifacts {
testArtifacts testJar
}

// Tests are pushed down to subprojects and will be checked there.
tasks.named("testingConventions").configure { enabled = false }

subprojects {
// Use tests from the root security qa project in subprojects
configurations.create('testArtifacts')
configurations.create('testArtifacts').transitive(false)

dependencies {
testImplementation project(":x-pack:plugin:core")
testArtifacts project(path: mainProject.path, configuration: 'testArtifacts')
testArtifacts testArtifact(project(mainProject.path))
}

testClusters.matching { it.name == "integTest" }.configureEach {
Expand Down