Skip to content

Commit

Permalink
Separate encrypted repository plugin integ tests (elastic#72959)
Browse files Browse the repository at this point in the history
The encrypted repository module supports encryption with existing
repository plugins. Currently the integration tests with these plugins
pull in all of the plugins into the same test classpath. That can cause
problems when the dependencies of those repositories need to differ.
This commit splits the tests into separate qa subprojects.
  • Loading branch information
rjernst authored May 12, 2021
1 parent 2dca93f commit 0937c3f
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 14 deletions.
15 changes: 1 addition & 14 deletions x-pack/plugin/repository-encrypted/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ evaluationDependsOn(xpackModule('core'))

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.internal-test-artifact'
esplugin {
name 'repository-encrypted'
description 'Elasticsearch Expanded Pack Plugin - client-side encrypted repositories.'
Expand All @@ -14,18 +15,4 @@ dependencies {
// necessary for the license check
compileOnly project(path: xpackModule('core'))
testImplementation(testArtifact(project(xpackModule('core'))))

// required for integ tests of encrypted FS repository
internalClusterTestImplementation project(":test:framework")
// required for integ tests of encrypted cloud repositories
internalClusterTestImplementation testArtifact(project(':plugins:repository-gcs'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':plugins:repository-azure'), 'internalClusterTest')
internalClusterTestImplementation(testArtifact(project(':plugins:repository-s3'), 'internalClusterTest')) {
// HACK, resolves jar hell, such as:
// jar1: jakarta.xml.bind/jakarta.xml.bind-api/2.3.2/8d49996a4338670764d7ca4b85a1c4ccf7fe665d/jakarta.xml.bind-api-2.3.2.jar
// jar2: javax.xml.bind/jaxb-api/2.2.2/aeb3021ca93dde265796d82015beecdcff95bf09/jaxb-api-2.2.2.jar
exclude group: 'javax.xml.bind', module: 'jaxb-api'
}
// for encrypted GCS repository integ tests
internalClusterTestRuntimeOnly 'com.google.guava:guava:26.0-jre'
}
8 changes: 8 additions & 0 deletions x-pack/plugin/repository-encrypted/qa/azure/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.java'

dependencies {
internalClusterTestImplementation testArtifact(project(':plugins:repository-azure'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test')
}
Empty file.
8 changes: 8 additions & 0 deletions x-pack/plugin/repository-encrypted/qa/gcs/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.java'

dependencies {
internalClusterTestImplementation testArtifact(project(':plugins:repository-gcs'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test')
}
8 changes: 8 additions & 0 deletions x-pack/plugin/repository-encrypted/qa/s3/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.java'

dependencies {
internalClusterTestImplementation testArtifact(project(':plugins:repository-s3'), 'internalClusterTest')
internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test')
}

0 comments on commit 0937c3f

Please sign in to comment.