-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SQL: Use new testing framework (#101774)
Port the following test suites from legacy-java-rest-test to internal-java-rest-test: x-pack/plugin/sql/qa/server/ * single-node * multi-node * multi-cluster-with-security
- Loading branch information
1 parent
330e8b9
commit c291e66
Showing
59 changed files
with
911 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 1 addition & 51 deletions
52
x-pack/plugin/sql/qa/server/multi-cluster-with-security/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,6 @@ | ||
import org.elasticsearch.gradle.testclusters.DefaultTestClustersTask | ||
import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE | ||
|
||
apply plugin: 'elasticsearch.legacy-java-rest-test' | ||
|
||
dependencies { | ||
javaRestTestImplementation project(path: xpackModule('ql:test-fixtures')) | ||
clusterPlugins project(':x-pack:qa:freeze-plugin') | ||
} | ||
|
||
def remoteClusterReg = testClusters.register('remote-cluster') { | ||
testDistribution = 'DEFAULT' | ||
setting 'node.roles', '[data,ingest,master]' | ||
setting 'xpack.ml.enabled', 'false' | ||
setting 'xpack.watcher.enabled', 'false' | ||
setting 'xpack.security.enabled', 'true' | ||
setting 'xpack.license.self_generated.type', 'trial' | ||
setting 'xpack.security.autoconfiguration.enabled', 'false' | ||
|
||
user username: "test_user", password: "x-pack-test-password" | ||
plugin ':x-pack:qa:freeze-plugin' | ||
} | ||
|
||
def javaRestTestClusterReg = testClusters.register('javaRestTest') { | ||
testDistribution = 'DEFAULT' | ||
setting 'xpack.ml.enabled', 'false' | ||
setting 'xpack.watcher.enabled', 'false' | ||
setting 'cluster.remote.my_remote_cluster.seeds', { | ||
remoteClusterReg.get().getAllTransportPortURI().collect { "\"$it\"" }.toString() | ||
}, IGNORE_VALUE | ||
setting 'cluster.remote.connections_per_cluster', "1" | ||
setting 'xpack.security.enabled', 'true' | ||
setting 'xpack.license.self_generated.type', 'trial' | ||
setting 'xpack.security.autoconfiguration.enabled', 'false' | ||
|
||
user username: "test_user", password: "x-pack-test-password" | ||
plugin ':x-pack:qa:freeze-plugin' | ||
} | ||
|
||
tasks.register("startRemoteCluster", DefaultTestClustersTask.class) { | ||
useCluster remoteClusterReg | ||
doLast { | ||
"Starting remote cluster before integ tests and integ test cluster is started" | ||
} | ||
} | ||
|
||
tasks.named("javaRestTest").configure { | ||
dependsOn 'startRemoteCluster' | ||
useCluster remoteClusterReg | ||
doFirst { | ||
nonInputProperties.systemProperty 'tests.rest.cluster.remote.host', remoteClusterReg.map(c->c.getAllHttpSocketURI().get(0)) | ||
// credentials for both local and remote clusters | ||
nonInputProperties.systemProperty 'tests.rest.cluster.multi.user', "test_user" | ||
nonInputProperties.systemProperty 'tests.rest.cluster.multi.password', "x-pack-test-password" | ||
} | ||
} | ||
tasks.named("check").configure {dependsOn("javaRestTest") } // run these tests as part of the "check" task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.