Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public void registerTestArtifactFromSourceSet(SourceSet sourceSet) {
featureSpec.disablePublication();
});

Configuration testApiElements = project.getConfigurations().getByName(sourceSet.getApiElementsConfigurationName());
testApiElements.extendsFrom(project.getConfigurations().getByName(sourceSet.getCompileClasspathConfigurationName()));
DependencyHandler dependencies = project.getDependencies();
project.getPlugins().withType(JavaPlugin.class, javaPlugin -> {
Dependency projectDependency = dependencies.create(project);
Expand Down
6 changes: 3 additions & 3 deletions x-pack/plugin/analytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ esplugin {
archivesBaseName = 'x-pack-analytics'

dependencies {
compileOnly project(":server")

api 'org.apache.commons:commons-math3:3.6.1'
compileOnly project(path: xpackModule('core'))
compileOnly project(":server")
testImplementation(testArtifact(project(xpackModule('core'))))
api 'org.apache.commons:commons-math3:3.6.1'
testImplementation(project(":client:rest-high-level"))
}

2 changes: 2 additions & 0 deletions x-pack/plugin/async-search/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(path: xpackModule('async'))

internalClusterTestImplementation project(":modules:reindex")
}


1 change: 1 addition & 0 deletions x-pack/plugin/async-search/qa/security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(xpackModule('async-search'))
javaRestTestImplementation project(':test:framework')
javaRestTestImplementation project(":client:rest-high-level")
}

testClusters.configureEach {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ archivesBaseName = 'x-pack'
dependencies {
testImplementation project(xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(':test:framework')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if instances like this should really be testApi since the intent is that folks that consume this test artifact will also obviously need the test framework to compile against this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this makes kind of sense. I'd like to revisit the api of our testFixtures in a separate commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, @dakrone already hit this issue, where he pulled in this change and then had too add a bunch of transitive dependencies to get things working again.

}

// let the yamlRestTests see the classpath of test
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/ccr/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation(testArtifact(project(xpackModule('monitoring'))))
testImplementation(project(":modules:analysis-common"))
}

tasks.named("testingConventions").configure {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugin/eql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ dependencies {
testImplementation project(path: ':plugins:transport-nio') // for http in RestEqlCancellationIT

testImplementation 'io.ous:jtoml:2.0.0'

internalClusterTestImplementation project(":client:rest-high-level")
}


Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugin/eql/qa/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies {
api project(path: xpackModule('core'))
api(testArtifact(project(xpackModule('core'))))
api project(xpackModule('ql:test-fixtures'))

implementation project(":client:rest-high-level")
// TOML parser for EqlActionIT tests
api 'io.ous:jtoml:2.0.0'
}
1 change: 1 addition & 0 deletions x-pack/plugin/eql/qa/correctness/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencies {
javaRestTestImplementation project(':test:framework')
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(xpackModule('ql:test-fixtures'))
javaRestTestImplementation project(":client:rest-high-level")
javaRestTestImplementation 'io.ous:jtoml:2.0.0'
}

Expand Down
10 changes: 7 additions & 3 deletions x-pack/plugin/identity-provider/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ archivesBaseName = 'x-pack-identity-provider'

dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))
// So that we can extend LocalStateCompositeXPackPlugin
testImplementation(testArtifact(project(xpackModule('security'))))

// the following are all SAML dependencies - might as well download the whole internet
api "org.opensaml:opensaml-core:${versions.opensaml}"
api "org.opensaml:opensaml-saml-api:${versions.opensaml}"
Expand Down Expand Up @@ -52,6 +50,12 @@ dependencies {

testImplementation 'org.elasticsearch:securemock:1.2'
testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}"
testImplementation(testArtifact(project(xpackModule('core'))))
// So that we can extend LocalStateCompositeXPackPlugin
testImplementation(testArtifact(project(xpackModule('security'))))
testImplementation project(':modules:lang-mustache')
internalClusterTestImplementation project(":modules:analysis-common")

}

tasks.named("dependencyLicenses").configure {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
//TODO: update javaRestTests to not rely on any code that it is testing
javaRestTestImplementation project(path: xpackModule('identity-provider'))
javaRestTestImplementation project(":client:rest-high-level")
}

testClusters.configureEach {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/ilm/qa/multi-node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'

dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(":client:rest-high-level")
}

File repoDir = file("$buildDir/testclusters/repo")
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/ilm/qa/with-security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'elasticsearch.authenticated-testclusters'

dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(":client:rest-high-level")
}

testClusters.configureEach {
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugin/ml/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ dependencies {
testImplementation project(path: xpackModule('ilm'))
testImplementation project(path: xpackModule('shutdown'))
testImplementation project(path: xpackModule('data-streams'))
testImplementation project(path: xpackModule('monitoring'))
testImplementation project(':modules:ingest-common')
testImplementation project(':modules:reindex')
testImplementation project(':modules:analysis-common')
// This should not be here
testImplementation(testArtifact(project(xpackModule('security'))))
// ml deps
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation(testArtifact(project(xpackModule('ml'))))
javaRestTestImplementation(testArtifact(project(xpackModule('security'))))
javaRestTestImplementation project(path: ':modules:ingest-common')
javaRestTestImplementation project(path: ':modules:reindex')
javaRestTestImplementation project(path: ':modules:transport-netty4')
javaRestTestImplementation project(path: xpackModule('autoscaling'))
javaRestTestImplementation project(path: xpackModule('data-streams'))
javaRestTestImplementation project(path: xpackModule('ilm'))
javaRestTestImplementation project(path: xpackModule('monitoring'))
javaRestTestImplementation project(path: xpackModule('transform'))
javaRestTestImplementation project(":client:rest-high-level")
}

// location for keys and certificates
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugin/monitoring/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ archivesBaseName = 'x-pack-monitoring'

dependencies {
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))

// monitoring deps
api project(':client:rest')
api project(':client:sniffer')

// baz - this goes away after we separate out the actions #27759
testImplementation project(":modules:analysis-common")
testImplementation project(xpackModule('watcher'))

testImplementation project(xpackModule('ilm'))
testImplementation project(xpackModule('data-streams'))
testImplementation(testArtifact(project(xpackModule('core'))))
}

tasks.named("dependencyLicenses").configure {
Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugin/ql/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ ext {
archivesBaseName = 'x-pack-ql'

dependencies {
api "org.antlr:antlr4-runtime:${antlrVersion}"
compileOnly project(path: xpackModule('core'))
testImplementation project(':test:framework')
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation(project(xpackModule('ql:test-fixtures'))) {
testApi(project(xpackModule('ql:test-fixtures'))) {
exclude group: 'org.elasticsearch.plugin', module: 'ql'
}
api "org.antlr:antlr4-runtime:${antlrVersion}"
testImplementation project(':test:framework')
testImplementation(testArtifact(project(xpackModule('core'))))
}
4 changes: 4 additions & 0 deletions x-pack/plugin/repository-encrypted/qa/azure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ apply plugin: 'elasticsearch.java'
dependencies {
internalClusterTestImplementation testArtifact(project(':plugins:repository-azure'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test')
internalClusterTestImplementation project(':server')
internalClusterTestImplementation project(':test:framework')
internalClusterTestImplementation project(':x-pack:plugin:core')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:core'))
}
5 changes: 5 additions & 0 deletions x-pack/plugin/repository-encrypted/qa/gcs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ apply plugin: 'elasticsearch.java'
dependencies {
internalClusterTestImplementation testArtifact(project(':plugins:repository-gcs'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test')
internalClusterTestImplementation project(':server')
internalClusterTestImplementation project(':test:framework')
internalClusterTestImplementation project(':x-pack:plugin:core')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:core'))

}
4 changes: 4 additions & 0 deletions x-pack/plugin/repository-encrypted/qa/s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ apply plugin: 'elasticsearch.java'
dependencies {
internalClusterTestImplementation testArtifact(project(':plugins:repository-s3'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test')
internalClusterTestImplementation project(':server')
internalClusterTestImplementation project(':test:framework')
internalClusterTestImplementation project(':x-pack:plugin:core')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:core'))
}
3 changes: 3 additions & 0 deletions x-pack/plugin/security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ dependencies {
testImplementation project(path: xpackModule('spatial'))
testImplementation project(path: ':modules:percolator')
testImplementation project(path: xpackModule('sql:sql-action'))
testImplementation project(path: ':modules:analysis-common')
testImplementation project(path: ':modules:reindex')
testImplementation project(":client:rest-high-level")

testImplementation(testArtifact(project(xpackModule('core'))))
internalClusterTestImplementation(testArtifact(project(xpackModule('core'))))
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugin/security/cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependencies {
}
testRuntimeOnly "com.google.guava:guava:${versions.jimfs_guava}"
testImplementation project(":test:framework")
testImplementation(testArtifact(project(xpackModule('core'))))}
testImplementation(testArtifact(project(xpackModule('core'))))
}

tasks.named("dependencyLicenses").configure {
mapping from: /bc.*/, to: 'bouncycastle'
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/security/qa/security-basic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.elasticsearch.gradle.internal.info.BuildParams
dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('security'))))
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(":client:rest-high-level")
}

if (BuildParams.inFipsJvm){
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugin/security/qa/security-trial/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
dependencies {
javaRestTestImplementation project(path: xpackModule('core'))
javaRestTestImplementation(testArtifact(project(xpackModule('security'))))
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(":client:rest-high-level")
}

testClusters.matching { it.name == 'javaRestTest' }.configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('security'))))
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation(project(":client:rest-high-level"))
}

testClusters.matching { it.name == 'javaRestTest' }.configureEach {
Expand Down
4 changes: 3 additions & 1 deletion x-pack/plugin/transform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ esplugin {

dependencies {
compileOnly project(":server")

compileOnly project(path: xpackModule('core'))

testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(path: xpackModule('analytics'))
testImplementation project(path: ':modules:aggs-matrix-stats')
testImplementation project(path: xpackModule('spatial'))

internalClusterTestImplementation project(":modules:reindex")
}

addQaCheckDependencies()
1 change: 1 addition & 0 deletions x-pack/plugin/transform/qa/multi-node-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(path: xpackModule('transform'))
javaRestTestImplementation project(":client:rest-high-level")
}

// location for keys and certificates
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugin/transform/qa/single-node-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apply plugin: 'elasticsearch.internal-java-rest-test'
dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(path: xpackModule('transform'))
javaRestTestImplementation project(":client:rest-high-level")
}

testClusters.configureEach {
Expand Down
3 changes: 3 additions & 0 deletions x-pack/plugin/watcher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies {
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation project(xpackModule('ilm'))
testImplementation project(xpackModule('data-streams'))
testImplementation project(':modules:lang-mustache')

// watcher deps
api 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20191001.1'
Expand All @@ -40,6 +41,8 @@ dependencies {
testImplementation 'org.subethamail:subethasmtp:3.1.7'
// needed for subethasmtp, has @GuardedBy annotation
testImplementation 'com.google.code.findbugs:jsr305:3.0.2'

internalClusterTestImplementation project(":modules:analysis-common")
}

// classes are missing, e.g. com.ibm.icu.lang.UCharacter
Expand Down
10 changes: 10 additions & 0 deletions x-pack/qa/evil-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
apply plugin: 'elasticsearch.standalone-test'

dependencies {
testImplementation(project(xpackModule('core')))
testImplementation("org.apache.kerby:kerb-admin:1.1.1")
testImplementation("org.apache.kerby:kerb-client:1.1.1")
testImplementation("org.apache.kerby:kerb-common:1.1.1")
testImplementation("org.apache.kerby:kerb-core:1.1.1")
testImplementation("org.apache.kerby:kerb-server:1.1.1")
testImplementation("org.apache.kerby:kerb-simplekdc:1.1.1")
testImplementation("org.apache.kerby:kerb-util:1.1.1")
testImplementation("org.apache.kerby:kerby-config:1.1.1")

testImplementation(testArtifact(project(xpackModule('security'))))
}

Expand Down
3 changes: 2 additions & 1 deletion x-pack/qa/reindex-tests-with-security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ apply plugin: 'elasticsearch.rest-resources'
dependencies {
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation(testArtifact(project(xpackModule('security'))))
testImplementation project(path: ':modules:reindex')
testImplementation(project(':modules:reindex'))
testImplementation(project(":client:rest-high-level"))
}

tasks.named("forbiddenPatterns").configure {
Expand Down
1 change: 1 addition & 0 deletions x-pack/qa/runtime-fields/with-security/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: 'elasticsearch.authenticated-testclusters'

dependencies {
javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
javaRestTestImplementation project(":client:rest-high-level")
}

testClusters.configureEach {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/qa/security-tools-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
apply plugin: 'elasticsearch.standalone-test'

dependencies {
testImplementation project(xpackModule('core'))
testImplementation project(xpackModule('security'))
testImplementation(testArtifact(project(xpackModule('core'))))
testImplementation(testArtifact(project(xpackModule('security'))))
testImplementation "com.google.jimfs:jimfs:${versions.jimfs}"
testRuntimeOnly "com.google.guava:guava:${versions.jimfs_guava}"
Expand Down
1 change: 1 addition & 0 deletions x-pack/qa/third-party/active-directory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'elasticsearch.standalone-test'
apply plugin: 'elasticsearch.test.fixtures'

dependencies {
testImplementation project(xpackModule('core'))
testImplementation project(xpackModule('security'))
testImplementation(testArtifact(project(xpackModule('security'))))}

Expand Down