[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
apply plugin: 'elasticsearch.java-rest-test'
|
2019-04-26 08:18:49 -04:00
|
|
|
|
|
|
|
dependencies {
|
[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
javaRestTestImplementation project(path: xpackModule('core'), configuration: 'default')
|
|
|
|
javaRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
|
|
javaRestTestImplementation project(path: xpackModule('transform'))
|
2020-06-14 16:30:44 -04:00
|
|
|
testImplementation project(':client:rest-high-level')
|
2019-04-26 08:18:49 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// location for keys and certificates
|
|
|
|
File keystoreDir = new File(project.buildDir, 'keystore')
|
|
|
|
File nodeKey = file("$keystoreDir/testnode.pem")
|
|
|
|
File nodeCert = file("$keystoreDir/testnode.crt")
|
|
|
|
// Add key and certs to test classpath: it expects it there
|
2020-07-31 07:09:04 -04:00
|
|
|
tasks.register("copyKeyCerts", Copy) {
|
2019-11-14 06:01:23 -05:00
|
|
|
from(project(':x-pack:plugin:core').file('src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/')) {
|
|
|
|
include 'testnode.crt', 'testnode.pem'
|
|
|
|
}
|
|
|
|
into keystoreDir
|
2019-04-26 08:18:49 -04:00
|
|
|
}
|
|
|
|
// Add keys and cets to test classpath: it expects it there
|
|
|
|
sourceSets.test.resources.srcDir(keystoreDir)
|
[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
tasks.named("processJavaRestTestResources").configure { dependsOn("copyKeyCerts") }
|
2019-04-26 08:18:49 -04:00
|
|
|
|
[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
tasks.named("javaRestTest").configure { dependsOn "copyKeyCerts" }
|
2019-06-14 03:57:37 -04:00
|
|
|
|
[7.x] Convert second 1/2 x-pack plugins from integTest to [yaml | java]RestTest or internalClusterTest (#61802) (#61856)
For 1/2 the plugins in x-pack, the integTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest, javaRestTest, or internalClusterTest.
This includes the following projects:
security, spatial, stack, transform, vecotrs, voting-only-node, and watcher.
A few of the more specialized qa projects within these plugins
have not been changed with this PR due to additional complexity which should
be addressed separately.
related: #60630
related: #56841
related: #59939
related: #55896
2020-09-02 12:20:55 -04:00
|
|
|
testClusters.javaRestTest {
|
2019-07-15 20:53:05 -04:00
|
|
|
testDistribution = 'DEFAULT'
|
2019-04-26 08:18:49 -04:00
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
|
|
|
setting 'xpack.security.authc.token.enabled', 'true'
|
|
|
|
setting 'xpack.security.transport.ssl.enabled', 'true'
|
|
|
|
setting 'xpack.security.transport.ssl.key', nodeKey.name
|
|
|
|
setting 'xpack.security.transport.ssl.certificate', nodeCert.name
|
|
|
|
setting 'xpack.security.transport.ssl.verification_mode', 'certificate'
|
|
|
|
setting 'xpack.security.audit.enabled', 'false'
|
|
|
|
setting 'xpack.license.self_generated.type', 'trial'
|
2019-06-14 03:57:37 -04:00
|
|
|
keystore 'bootstrap.password', 'x-pack-test-password'
|
|
|
|
keystore 'xpack.security.transport.ssl.secure_key_passphrase', 'testnode'
|
|
|
|
numberOfNodes = 3
|
2019-04-26 08:18:49 -04:00
|
|
|
|
|
|
|
extraConfigFile nodeKey.name, nodeKey
|
|
|
|
extraConfigFile nodeCert.name, nodeCert
|
2019-06-14 03:57:37 -04:00
|
|
|
user username: "x_pack_rest_user", password: "x-pack-test-password"
|
2019-04-26 08:18:49 -04:00
|
|
|
}
|