2020-08-04 08:46:32 -04:00
|
|
|
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask
|
[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
|
|
|
import org.elasticsearch.gradle.test.rest.JavaRestTestPlugin
|
2019-08-09 06:32:27 -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
|
|
|
apply plugin: 'elasticsearch.java-rest-test'
|
2019-05-22 00:27:45 -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('security'), configuration: 'testArtifacts')
|
|
|
|
javaRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2019-05-22 00:27:45 -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
|
|
|
javaRestTest {
|
2019-11-14 06:01:23 -05:00
|
|
|
description = "Run tests against a cluster that doesn't have security"
|
2020-08-04 08:46:32 -04:00
|
|
|
systemProperty 'tests.has_security', 'false'
|
2019-05-22 00:27:45 -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-11-14 06:01:23 -05:00
|
|
|
testDistribution = 'DEFAULT'
|
|
|
|
numberOfNodes = 2
|
|
|
|
setting 'xpack.ml.enabled', 'false'
|
|
|
|
setting 'xpack.license.self_generated.type', 'basic'
|
|
|
|
setting 'xpack.security.enabled', 'false'
|
2019-06-18 04:51:20 -04:00
|
|
|
}
|
2019-05-22 00:27:45 -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
|
|
|
task javaRestTestWithSecurity(type: StandaloneRestIntegTestTask) {
|
|
|
|
description = "Run tests against a cluster that has security enabled"
|
|
|
|
useCluster testClusters.javaRestTest
|
|
|
|
dependsOn javaRestTest
|
2019-11-14 06:01:23 -05:00
|
|
|
systemProperty 'tests.has_security', 'true'
|
[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
|
|
|
testClassesDirs = sourceSets.javaRestTest.output.classesDirs
|
|
|
|
classpath = sourceSets.javaRestTest.runtimeClasspath
|
2019-11-14 06:01:23 -05:00
|
|
|
doFirst {
|
[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-11-14 06:01:23 -05:00
|
|
|
// Reconfigure cluster to enable security
|
|
|
|
setting 'xpack.security.enabled', 'true'
|
|
|
|
setting 'xpack.security.authc.anonymous.roles', 'anonymous'
|
|
|
|
setting 'xpack.security.transport.ssl.enabled', 'true'
|
|
|
|
setting 'xpack.security.transport.ssl.certificate', 'transport.crt'
|
|
|
|
setting 'xpack.security.transport.ssl.key', 'transport.key'
|
|
|
|
setting 'xpack.security.transport.ssl.key_passphrase', 'transport-password'
|
|
|
|
setting 'xpack.security.transport.ssl.certificate_authorities', 'ca.crt'
|
|
|
|
|
[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
|
|
|
extraConfigFile 'transport.key', file('src/javaRestTest/resources/ssl/transport.key')
|
|
|
|
extraConfigFile 'transport.crt', file('src/javaRestTest/resources/ssl/transport.crt')
|
|
|
|
extraConfigFile 'ca.crt', file('src/javaRestTest/resources/ssl/ca.crt')
|
|
|
|
extraConfigFile 'roles.yml', file('src/javaRestTest/resources/roles.yml')
|
2019-11-14 06:01:23 -05:00
|
|
|
|
|
|
|
user username: "admin_user", password: "admin-password"
|
|
|
|
user username: "security_test_user", password: "security-test-password", role: "security_test_role"
|
|
|
|
|
|
|
|
restart()
|
2019-06-18 04:51:20 -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
|
|
|
nonInputProperties.systemProperty 'tests.rest.cluster', "${-> testClusters.javaRestTest.getAllHttpSocketURI().join(",")}"
|
2019-11-14 06:01:23 -05:00
|
|
|
}
|
2019-05-22 00:27:45 -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("check").configure { dependsOn(javaRestTestWithSecurity) }
|
2019-05-22 00:27:45 -04:00
|
|
|
|