This commit removes `integTest` task from all es-plugins. Most relevant projects have been converted to use yamlRestTest, javaRestTest, or internalClusterTest in prior PRs. A few projects needed to be adjusted to allow complete removal of this task * x-pack/plugin - converted to use yamlRestTest and javaRestTest * plugins/repository-hdfs - kept the integTest task, but use `rest-test` plugin to define the task * qa/die-with-dignity - convert to javaRestTest * x-pack/qa/security-example-spi-extension - convert to javaRestTest * multiple projects - remove the integTest.enabled = false (yay!) related: #61802 related: #60630 related: #59444 related: #59089 related: #56841 related: #59939 related: #55896
This commit is contained in:
parent
6d2cab9437
commit
d8dad9ab2c
|
@ -25,7 +25,6 @@ import org.elasticsearch.gradle.Version
|
||||||
import org.elasticsearch.gradle.VersionProperties
|
import org.elasticsearch.gradle.VersionProperties
|
||||||
import org.elasticsearch.gradle.dependencies.CompileOnlyResolvePlugin
|
import org.elasticsearch.gradle.dependencies.CompileOnlyResolvePlugin
|
||||||
import org.elasticsearch.gradle.info.BuildParams
|
import org.elasticsearch.gradle.info.BuildParams
|
||||||
import org.elasticsearch.gradle.test.RestIntegTestTask
|
|
||||||
import org.elasticsearch.gradle.test.RestTestBasePlugin
|
import org.elasticsearch.gradle.test.RestTestBasePlugin
|
||||||
import org.elasticsearch.gradle.testclusters.RunTask
|
import org.elasticsearch.gradle.testclusters.RunTask
|
||||||
import org.elasticsearch.gradle.util.Util
|
import org.elasticsearch.gradle.util.Util
|
||||||
|
@ -62,16 +61,7 @@ class PluginBuildPlugin implements Plugin<Project> {
|
||||||
boolean isXPackModule = project.path.startsWith(':x-pack:plugin')
|
boolean isXPackModule = project.path.startsWith(':x-pack:plugin')
|
||||||
boolean isModule = project.path.startsWith(':modules:') || isXPackModule
|
boolean isModule = project.path.startsWith(':modules:') || isXPackModule
|
||||||
|
|
||||||
createIntegTestTask(project)
|
|
||||||
createBundleTasks(project, extension)
|
createBundleTasks(project, extension)
|
||||||
project.tasks.named("integTest").configure {
|
|
||||||
it.dependsOn(project.tasks.named("bundlePlugin"))
|
|
||||||
}
|
|
||||||
if (isModule) {
|
|
||||||
project.testClusters.integTest.module(project.tasks.bundlePlugin.archiveFile)
|
|
||||||
} else {
|
|
||||||
project.testClusters.integTest.plugin(project.tasks.bundlePlugin.archiveFile)
|
|
||||||
}
|
|
||||||
|
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
project.extensions.getByType(PluginPropertiesExtension).extendedPlugins.each { pluginName ->
|
project.extensions.getByType(PluginPropertiesExtension).extendedPlugins.each { pluginName ->
|
||||||
|
@ -118,14 +108,6 @@ class PluginBuildPlugin implements Plugin<Project> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//disable integTest task if project has been converted to use yaml or java rest test plugin
|
|
||||||
project.pluginManager.withPlugin("elasticsearch.yaml-rest-test") {
|
|
||||||
project.tasks.integTest.enabled = false
|
|
||||||
}
|
|
||||||
project.pluginManager.withPlugin("elasticsearch.java-rest-test") {
|
|
||||||
project.tasks.integTest.enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
project.tasks.named('testingConventions').configure {
|
project.tasks.named('testingConventions').configure {
|
||||||
naming.clear()
|
naming.clear()
|
||||||
naming {
|
naming {
|
||||||
|
@ -144,7 +126,6 @@ class PluginBuildPlugin implements Plugin<Project> {
|
||||||
// allow running ES with this plugin in the foreground of a build
|
// allow running ES with this plugin in the foreground of a build
|
||||||
project.tasks.register('run', RunTask) {
|
project.tasks.register('run', RunTask) {
|
||||||
dependsOn(project.tasks.bundlePlugin)
|
dependsOn(project.tasks.bundlePlugin)
|
||||||
useCluster project.testClusters.integTest
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,13 +168,6 @@ class PluginBuildPlugin implements Plugin<Project> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Adds an integTest task which runs rest tests */
|
|
||||||
private static void createIntegTestTask(Project project) {
|
|
||||||
RestIntegTestTask integTest = project.tasks.create('integTest', RestIntegTestTask.class)
|
|
||||||
integTest.mustRunAfter('precommit', 'test')
|
|
||||||
project.check.dependsOn(integTest)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a bundlePlugin task which builds the zip containing the plugin jars,
|
* Adds a bundlePlugin task which builds the zip containing the plugin jars,
|
||||||
* metadata, properties, and packaging files
|
* metadata, properties, and packaging files
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class PluginBuildPluginTests extends GradleUnitTestCase {
|
||||||
);
|
);
|
||||||
assertNotNull("plugin extensions has the right type", project.getExtensions().findByType(PluginPropertiesExtension.class));
|
assertNotNull("plugin extensions has the right type", project.getExtensions().findByType(PluginPropertiesExtension.class));
|
||||||
|
|
||||||
assertNotNull("plugin created an integTest class", project.getTasks().findByName("integTest"));
|
assertNull("plugin should not create the integTest task", project.getTasks().findByName("integTest"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("https://github.com/elastic/elasticsearch/issues/47123")
|
@Ignore("https://github.com/elastic/elasticsearch/issues/47123")
|
||||||
|
|
|
@ -35,4 +35,3 @@ dependenciesInfo.enabled = false
|
||||||
|
|
||||||
// no unit tests
|
// no unit tests
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -253,10 +253,6 @@ project.rootProject.subprojects.findAll { it.parent.path == ':modules' }.each {
|
||||||
copyLog4jProperties(buildOssLog4jConfig, module)
|
copyLog4jProperties(buildOssLog4jConfig, module)
|
||||||
copyLog4jProperties(buildDefaultLog4jConfig, module)
|
copyLog4jProperties(buildDefaultLog4jConfig, module)
|
||||||
|
|
||||||
// make sure the module's integration tests run after the integ-test-zip (ie rest tests)
|
|
||||||
module.afterEvaluate({
|
|
||||||
module.integTest.mustRunAfter(':distribution:archives:integ-test-zip:integTest')
|
|
||||||
})
|
|
||||||
restTestExpansions['expected.modules.count'] += 1
|
restTestExpansions['expected.modules.count'] += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,6 @@ restResources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
tasks.named("dependencyLicenses").configure {
|
tasks.named("dependencyLicenses").configure {
|
||||||
mapping from: /lucene-.*/, to: 'lucene'
|
mapping from: /lucene-.*/, to: 'lucene'
|
||||||
mapping from: /asm-.*/, to: 'asm'
|
mapping from: /asm-.*/, to: 'asm'
|
||||||
|
|
|
@ -54,8 +54,6 @@ restResources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
tasks.named("test").configure {
|
tasks.named("test").configure {
|
||||||
// in WhenThingsGoWrongTests we intentionally generate an out of memory error, this prevents the heap from being dumped to disk
|
// in WhenThingsGoWrongTests we intentionally generate an out of memory error, this prevents the heap from being dumped to disk
|
||||||
jvmArgs '-XX:-OmitStackTraceInFastThrow', '-XX:-HeapDumpOnOutOfMemoryError'
|
jvmArgs '-XX:-OmitStackTraceInFastThrow', '-XX:-HeapDumpOnOutOfMemoryError'
|
||||||
|
|
|
@ -22,4 +22,3 @@ esplugin {
|
||||||
classname 'org.elasticsearch.systemd.SystemdPlugin'
|
classname 'org.elasticsearch.systemd.SystemdPlugin'
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ import static org.elasticsearch.gradle.PropertyNormalization.IGNORE_VALUE
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.test.fixtures'
|
apply plugin: 'elasticsearch.test.fixtures'
|
||||||
apply plugin: 'elasticsearch.rest-resources'
|
apply plugin: 'elasticsearch.rest-resources'
|
||||||
|
apply plugin: 'elasticsearch.rest-test'
|
||||||
|
|
||||||
esplugin {
|
esplugin {
|
||||||
description 'The HDFS repository plugin adds support for Hadoop Distributed File-System (HDFS) repositories.'
|
description 'The HDFS repository plugin adds support for Hadoop Distributed File-System (HDFS) repositories.'
|
||||||
|
@ -94,6 +95,14 @@ tasks.named("dependencyLicenses").configure {
|
||||||
mapping from: /hadoop-.*/, to: 'hadoop'
|
mapping from: /hadoop-.*/, to: 'hadoop'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.named("integTest").configure {
|
||||||
|
it.dependsOn(project.tasks.named("bundlePlugin"))
|
||||||
|
}
|
||||||
|
|
||||||
|
testClusters.integTest {
|
||||||
|
plugin(project.tasks.bundlePlugin.archiveFile)
|
||||||
|
}
|
||||||
|
|
||||||
String realm = "BUILD.ELASTIC.CO"
|
String realm = "BUILD.ELASTIC.CO"
|
||||||
String krb5conf = project(':test:fixtures:krb5kdc-fixture').ext.krb5Conf("hdfs")
|
String krb5conf = project(':test:fixtures:krb5kdc-fixture').ext.krb5Conf("hdfs")
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ esplugin {
|
||||||
hasClientJar = true
|
hasClientJar = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// integTest have been converted to internalClusterTest
|
|
||||||
integTest.enabled = false
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':libs:elasticsearch-nio')
|
api project(':libs:elasticsearch-nio')
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,6 @@
|
||||||
import org.elasticsearch.gradle.info.BuildParams
|
import org.elasticsearch.gradle.info.BuildParams
|
||||||
|
|
||||||
/*
|
apply plugin: 'elasticsearch.java-rest-test'
|
||||||
* Licensed to Elasticsearch under one or more contributor
|
|
||||||
* license agreements. See the NOTICE file distributed with
|
|
||||||
* this work for additional information regarding copyright
|
|
||||||
* ownership. Elasticsearch licenses this file to you under
|
|
||||||
* the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
* not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.testclusters'
|
|
||||||
apply plugin: 'elasticsearch.esplugin'
|
apply plugin: 'elasticsearch.esplugin'
|
||||||
|
|
||||||
esplugin {
|
esplugin {
|
||||||
|
@ -27,17 +8,21 @@ esplugin {
|
||||||
classname 'org.elasticsearch.DieWithDignityPlugin'
|
classname 'org.elasticsearch.DieWithDignityPlugin'
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest {
|
dependencies {
|
||||||
|
// let the javaRestTest see the classpath of main
|
||||||
|
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
|
||||||
|
}
|
||||||
|
|
||||||
|
javaRestTest {
|
||||||
systemProperty 'tests.security.manager', 'false'
|
systemProperty 'tests.security.manager', 'false'
|
||||||
systemProperty 'tests.system_call_filter', 'false'
|
systemProperty 'tests.system_call_filter', 'false'
|
||||||
nonInputProperties.systemProperty 'log', "${-> testClusters.integTest.singleNode().getServerLog()}"
|
nonInputProperties.systemProperty 'log', "${-> testClusters.javaRestTest.singleNode().getServerLog()}"
|
||||||
systemProperty 'runtime.java.home', BuildParams.runtimeJavaHome
|
systemProperty 'runtime.java.home', BuildParams.runtimeJavaHome
|
||||||
}
|
}
|
||||||
|
|
||||||
testClusters.integTest {
|
testClusters.javaRestTest {
|
||||||
systemProperty "die.with.dignity.test", "whatever"
|
systemProperty "die.with.dignity.test", "whatever"
|
||||||
}
|
}
|
||||||
|
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
check.dependsOn integTest
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing,
|
* Unless required by applicable law or agreed to in writing,
|
||||||
* software distributed under the License is distributed on an
|
* software distributed under the License is distributed on an
|
||||||
|
@ -67,9 +67,9 @@ public class DieWithDignityIT extends ESRestTestCase {
|
||||||
try {
|
try {
|
||||||
while (it.hasNext() && (fatalError == false || fatalErrorInThreadExiting == false)) {
|
while (it.hasNext() && (fatalError == false || fatalErrorInThreadExiting == false)) {
|
||||||
final String line = it.next();
|
final String line = it.next();
|
||||||
if (line.matches(".*ERROR.*o\\.e\\.ExceptionsHelper.*integTest-0.*fatal error.*")) {
|
if (line.matches(".*ERROR.*o\\.e\\.ExceptionsHelper.*javaRestTest-0.*fatal error.*")) {
|
||||||
fatalError = true;
|
fatalError = true;
|
||||||
} else if (line.matches(".*ERROR.*o\\.e\\.b\\.ElasticsearchUncaughtExceptionHandler.*integTest-0.*"
|
} else if (line.matches(".*ERROR.*o\\.e\\.b\\.ElasticsearchUncaughtExceptionHandler.*javaRestTest-0.*"
|
||||||
+ "fatal error in thread \\[Thread-\\d+\\], exiting.*")) {
|
+ "fatal error in thread \\[Thread-\\d+\\], exiting.*")) {
|
||||||
fatalErrorInThreadExiting = true;
|
fatalErrorInThreadExiting = true;
|
||||||
assertTrue(it.hasNext());
|
assertTrue(it.hasNext());
|
||||||
|
@ -87,6 +87,15 @@ public class DieWithDignityIT extends ESRestTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean containsAll(String line, String... subStrings) {
|
||||||
|
for (String subString : subStrings) {
|
||||||
|
if (line.matches(subString) == false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void debugLogs(Path path) throws IOException {
|
private void debugLogs(Path path) throws IOException {
|
||||||
try (BufferedReader reader = Files.newBufferedReader(path)) {
|
try (BufferedReader reader = Files.newBufferedReader(path)) {
|
||||||
reader.lines().forEach(line -> logger.info(line));
|
reader.lines().forEach(line -> logger.info(line));
|
|
@ -20,4 +20,3 @@ dependencies {
|
||||||
api 'org.apache.commons:commons-math3:3.2'
|
api 'org.apache.commons:commons-math3:3.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -29,5 +29,4 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('async'))
|
testImplementation project(path: xpackModule('async'))
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
|
|
|
@ -21,5 +21,5 @@ dependencyLicenses {
|
||||||
tasks.named("test").configure {
|
tasks.named("test").configure {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@ esplugin {
|
||||||
}
|
}
|
||||||
archivesBaseName = 'x-pack-autoscaling'
|
archivesBaseName = 'x-pack-autoscaling'
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
tasks.named('internalClusterTest').configure {
|
tasks.named('internalClusterTest').configure {
|
||||||
if (BuildParams.isSnapshotBuild() == false) {
|
if (BuildParams.isSnapshotBuild() == false) {
|
||||||
systemProperty 'es.autoscaling_feature_flag_registered', 'true'
|
systemProperty 'es.autoscaling_feature_flag_registered', 'true'
|
||||||
|
|
|
@ -5,17 +5,16 @@ import org.gradle.internal.jvm.Jvm
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets
|
import java.nio.charset.StandardCharsets
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.testclusters'
|
apply plugin: 'elasticsearch.java-rest-test'
|
||||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
apply plugin: 'elasticsearch.yaml-rest-test'
|
||||||
apply plugin: 'elasticsearch.rest-test'
|
|
||||||
apply plugin: 'elasticsearch.rest-resources'
|
|
||||||
apply plugin: 'elasticsearch.validate-rest-spec'
|
apply plugin: 'elasticsearch.validate-rest-spec'
|
||||||
|
|
||||||
archivesBaseName = 'x-pack'
|
archivesBaseName = 'x-pack'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation project(xpackModule('core')) // this redundant dependency is here to make IntelliJ happy
|
yamlRestTestImplementation project(xpackModule('core')) // this redundant dependency is here to make IntelliJ happy
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
yamlRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
|
javaRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
@ -62,14 +61,21 @@ subprojects {
|
||||||
configurations {
|
configurations {
|
||||||
testArtifacts.extendsFrom testRuntime
|
testArtifacts.extendsFrom testRuntime
|
||||||
testArtifacts.extendsFrom testImplementation
|
testArtifacts.extendsFrom testImplementation
|
||||||
|
testArtifacts.extendsFrom yamlRestTestImplementation
|
||||||
|
testArtifacts.extendsFrom javaRestTestImplementation
|
||||||
}
|
}
|
||||||
|
|
||||||
restResources {
|
restResources {
|
||||||
restApi {
|
restApi {
|
||||||
includeCore '*'
|
includeCore '*'
|
||||||
|
includeXpack '*'
|
||||||
|
}
|
||||||
|
restTests {
|
||||||
|
includeXpack '*'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//The api and tests need to stay at src/test/... since some external tooling depends on that exact file path.
|
||||||
artifacts {
|
artifacts {
|
||||||
restXpackSpecs(new File(projectDir, "src/test/resources/rest-api-spec/api"))
|
restXpackSpecs(new File(projectDir, "src/test/resources/rest-api-spec/api"))
|
||||||
restXpackTests(new File(projectDir, "src/test/resources/rest-api-spec/test"))
|
restXpackTests(new File(projectDir, "src/test/resources/rest-api-spec/test"))
|
||||||
|
@ -77,7 +83,10 @@ artifacts {
|
||||||
|
|
||||||
def testJar = tasks.register("testJar", Jar) {
|
def testJar = tasks.register("testJar", Jar) {
|
||||||
appendix 'test'
|
appendix 'test'
|
||||||
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||||
from sourceSets.test.output
|
from sourceSets.test.output
|
||||||
|
from sourceSets.yamlRestTest.output
|
||||||
|
from sourceSets.javaRestTest.output
|
||||||
/*
|
/*
|
||||||
* Stick the license and notice file in the jar. This isn't strictly
|
* Stick the license and notice file in the jar. This isn't strictly
|
||||||
* needed because we don't publish it but it makes our super-paranoid
|
* needed because we don't publish it but it makes our super-paranoid
|
||||||
|
@ -114,10 +123,10 @@ tasks.register("copyKeyCerts", Copy) {
|
||||||
into keystoreDir
|
into keystoreDir
|
||||||
}
|
}
|
||||||
// Add keystores to test classpath: it expects it there
|
// Add keystores to test classpath: it expects it there
|
||||||
sourceSets.test.resources.srcDir(keystoreDir)
|
sourceSets.yamlRestTest.resources.srcDir(keystoreDir)
|
||||||
processTestResources.dependsOn("copyKeyCerts")
|
processYamlRestTestResources.dependsOn("copyKeyCerts")
|
||||||
|
|
||||||
integTest {
|
yamlRestTest {
|
||||||
/*
|
/*
|
||||||
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
|
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
|
||||||
* other if we allow them to set the number of available processors as it's set-once in Netty.
|
* other if we allow them to set the number of available processors as it's set-once in Netty.
|
||||||
|
@ -137,7 +146,7 @@ integTest {
|
||||||
dependsOn copyKeyCerts
|
dependsOn copyKeyCerts
|
||||||
}
|
}
|
||||||
|
|
||||||
testClusters.integTest {
|
testClusters.all {
|
||||||
testDistribution = 'DEFAULT' // this is important since we use the reindex module in ML
|
testDistribution = 'DEFAULT' // this is important since we use the reindex module in ML
|
||||||
setting 'xpack.ml.enabled', 'true'
|
setting 'xpack.ml.enabled', 'true'
|
||||||
setting 'xpack.security.enabled', 'true'
|
setting 'xpack.security.enabled', 'true'
|
||||||
|
|
|
@ -10,8 +10,6 @@ esplugin {
|
||||||
}
|
}
|
||||||
archivesBaseName = 'x-pack-ccr'
|
archivesBaseName = 'x-pack-ccr'
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// Integration Test classes that cannot run with the security manager
|
// Integration Test classes that cannot run with the security manager
|
||||||
String[] noSecurityManagerITClasses = ["**/CloseFollowerIndexIT.class"]
|
String[] noSecurityManagerITClasses = ["**/CloseFollowerIndexIT.class"]
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ esplugin {
|
||||||
extendedPlugins = ['x-pack-core']
|
extendedPlugins = ['x-pack-core']
|
||||||
}
|
}
|
||||||
archivesBaseName = 'x-pack-data-streams'
|
archivesBaseName = 'x-pack-data-streams'
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||||
|
|
|
@ -21,4 +21,3 @@ dependencies {
|
||||||
compileOnly project(":x-pack:plugin:core")
|
compileOnly project(":x-pack:plugin:core")
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -17,9 +17,6 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('monitoring'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('monitoring'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
// No real integ tests in the module:
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
|
|
@ -15,9 +15,6 @@ ext {
|
||||||
|
|
||||||
archivesBaseName = 'x-pack-eql'
|
archivesBaseName = 'x-pack-eql'
|
||||||
|
|
||||||
// All integration tests live in qa modules
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||||
compileOnly(project(':modules:lang-painless')) {
|
compileOnly(project(':modules:lang-painless')) {
|
||||||
|
|
|
@ -12,8 +12,3 @@ dependencies {
|
||||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -22,4 +22,3 @@ gradle.projectsEvaluated {
|
||||||
.each { check.dependsOn it.check }
|
.each { check.dependsOn it.check }
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -359,11 +359,6 @@ internalClusterTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
|
|
@ -25,4 +25,3 @@ gradle.projectsEvaluated {
|
||||||
.each { check.dependsOn it.check }
|
.each { check.dependsOn it.check }
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -14,4 +14,3 @@ dependencies {
|
||||||
internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -14,4 +14,3 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -96,13 +96,6 @@ project.afterEvaluate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
tasks.named("integTest").configure {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
def checkTask = tasks.named("check")
|
def checkTask = tasks.named("check")
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
|
|
|
@ -40,8 +40,3 @@ tasks.named("dependencyLicenses").configure {
|
||||||
mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
|
mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
|
||||||
mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
|
mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
tasks.named("integTest").configure { enabled = false }
|
|
||||||
|
|
|
@ -29,8 +29,3 @@ artifacts {
|
||||||
archives tasks.named("jar")
|
archives tasks.named("jar")
|
||||||
testArtifacts testJar
|
testArtifacts testJar
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable integration tests for now
|
|
||||||
tasks.named("integTest").configure {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
evaluationDependsOn(xpackModule('core'))
|
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.esplugin'
|
apply plugin: 'elasticsearch.esplugin'
|
||||||
esplugin {
|
esplugin {
|
||||||
name 'repositories-metering-api'
|
name 'repositories-metering-api'
|
||||||
|
@ -14,11 +12,6 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
@ -41,6 +34,3 @@ task testJar(type: Jar) {
|
||||||
artifacts {
|
artifacts {
|
||||||
testArtifacts testJar
|
testArtifacts testJar
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,4 +14,3 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
evaluationDependsOn(xpackModule('core'))
|
|
||||||
|
|
||||||
apply plugin: 'elasticsearch.esplugin'
|
apply plugin: 'elasticsearch.esplugin'
|
||||||
|
|
||||||
esplugin {
|
esplugin {
|
||||||
|
@ -23,4 +21,3 @@ dependencyLicenses {
|
||||||
ignoreSha 'x-pack-core'
|
ignoreSha 'x-pack-core'
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
apply plugin: 'elasticsearch.testclusters'
|
apply plugin: 'elasticsearch.java-rest-test'
|
||||||
apply plugin: 'elasticsearch.standalone-rest-test'
|
|
||||||
apply plugin: 'elasticsearch.rest-test'
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation project(path: xpackProject('plugin').path, configuration: 'testArtifacts')
|
javaRestTestImplementation project(path: xpackProject('plugin').path, configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
def clusterCredentials = [username: System.getProperty('tests.rest.cluster.username', 'test_admin'),
|
def clusterCredentials = [username: System.getProperty('tests.rest.cluster.username', 'test_admin'),
|
||||||
password: System.getProperty('tests.rest.cluster.password', 'x-pack-test-password')]
|
password: System.getProperty('tests.rest.cluster.password', 'x-pack-test-password')]
|
||||||
|
|
||||||
integTest {
|
javaRestTest {
|
||||||
systemProperty 'tests.rest.cluster.username', clusterCredentials.username
|
systemProperty 'tests.rest.cluster.username', clusterCredentials.username
|
||||||
systemProperty 'tests.rest.cluster.password', clusterCredentials.password
|
systemProperty 'tests.rest.cluster.password', clusterCredentials.password
|
||||||
}
|
}
|
||||||
|
|
||||||
testClusters.integTest {
|
testClusters.all {
|
||||||
testDistribution = 'DEFAULT'
|
testDistribution = 'DEFAULT'
|
||||||
setting 'xpack.security.enabled', 'true'
|
setting 'xpack.security.enabled', 'true'
|
||||||
setting 'xpack.watcher.enabled', 'false'
|
setting 'xpack.watcher.enabled', 'false'
|
||||||
|
|
|
@ -9,8 +9,6 @@ esplugin {
|
||||||
}
|
}
|
||||||
archivesBaseName = 'x-pack-searchbusinessrules'
|
archivesBaseName = 'x-pack-searchbusinessrules'
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
|
|
|
@ -15,11 +15,6 @@ dependencies {
|
||||||
internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
internalClusterTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
@ -43,7 +38,7 @@ artifacts {
|
||||||
testArtifacts testJar
|
testArtifacts testJar
|
||||||
}
|
}
|
||||||
|
|
||||||
testClusters.integTest {
|
testClusters.all {
|
||||||
if (BuildParams.isSnapshotBuild() == false) {
|
if (BuildParams.isSnapshotBuild() == false) {
|
||||||
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
|
systemProperty 'es.searchable_snapshots_feature_enabled', 'true'
|
||||||
}
|
}
|
||||||
|
|
|
@ -486,11 +486,6 @@ internalClusterTest {
|
||||||
systemProperty 'es.transport.buffer.size', '256k'
|
systemProperty 'es.transport.buffer.size', '256k'
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
|
|
@ -25,9 +25,6 @@ configurations {
|
||||||
|
|
||||||
archivesBaseName = 'x-pack-sql'
|
archivesBaseName = 'x-pack-sql'
|
||||||
|
|
||||||
// All integration tests live in qa modules
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||||
compileOnly(project(':modules:lang-painless')) {
|
compileOnly(project(':modules:lang-painless')) {
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class XPackRestIT extends ESClientYamlSuiteTestCase {
|
||||||
|
|
||||||
@ParametersFactory
|
@ParametersFactory
|
||||||
public static Iterable<Object[]> parameters() throws Exception {
|
public static Iterable<Object[]> parameters() throws Exception {
|
||||||
return ESClientYamlSuiteTestCase.createParameters();
|
return createParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -211,7 +211,7 @@ public class XPackRestIT extends ESClientYamlSuiteTestCase {
|
||||||
if (isWaitForPendingTasks()) {
|
if (isWaitForPendingTasks()) {
|
||||||
// This waits for pending tasks to complete, so must go last (otherwise
|
// This waits for pending tasks to complete, so must go last (otherwise
|
||||||
// it could be waiting for pending tasks while monitoring is still running).
|
// it could be waiting for pending tasks while monitoring is still running).
|
||||||
ESRestTestCase.waitForPendingTasks(adminClient(), task -> {
|
waitForPendingTasks(adminClient(), task -> {
|
||||||
// Don't check rollup jobs because we clear them in the superclass.
|
// Don't check rollup jobs because we clear them in the superclass.
|
||||||
return task.contains(RollupJob.NAME);
|
return task.contains(RollupJob.NAME);
|
||||||
});
|
});
|
|
@ -24,4 +24,3 @@ gradle.projectsEvaluated {
|
||||||
.each { check.dependsOn it.check }
|
.each { check.dependsOn it.check }
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -16,11 +16,6 @@ dependencies {
|
||||||
testImplementation project(path: ':modules:aggs-matrix-stats')
|
testImplementation project(path: ':modules:aggs-matrix-stats')
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
|
|
@ -15,4 +15,3 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -11,8 +11,3 @@ dependencies {
|
||||||
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -131,11 +131,6 @@ internalClusterTest {
|
||||||
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
||||||
}
|
}
|
||||||
|
|
||||||
// xpack modules are installed in real clusters as the meta plugin, so
|
|
||||||
// installing them as individual plugins for integ tests doesn't make sense,
|
|
||||||
// so we disable integ tests
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
||||||
// add all sub-projects of the qa sub-project
|
// add all sub-projects of the qa sub-project
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
project.subprojects
|
project.subprojects
|
||||||
|
|
|
@ -13,4 +13,3 @@ dependencies {
|
||||||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
integTest.enabled = false
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
apply plugin: 'elasticsearch.testclusters'
|
apply plugin: 'elasticsearch.java-rest-test'
|
||||||
apply plugin: 'elasticsearch.esplugin'
|
apply plugin: 'elasticsearch.esplugin'
|
||||||
|
|
||||||
esplugin {
|
esplugin {
|
||||||
|
@ -10,16 +10,19 @@ esplugin {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly project(':x-pack:plugin:core')
|
compileOnly project(':x-pack:plugin:core')
|
||||||
testImplementation project(xpackProject('transport-client').path)
|
javaRestTestImplementation project(xpackProject('transport-client').path)
|
||||||
|
javaRestTestImplementation project(':x-pack:plugin:core')
|
||||||
|
javaRestTestImplementation project(':client:rest-high-level')
|
||||||
|
// let the javaRestTest see the classpath of main
|
||||||
|
javaRestTestImplementation project.sourceSets.main.runtimeClasspath
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
integTest {
|
javaRestTest {
|
||||||
dependsOn buildZip
|
|
||||||
systemProperty 'tests.security.manager', 'false'
|
systemProperty 'tests.security.manager', 'false'
|
||||||
}
|
}
|
||||||
|
testClusters.all {
|
||||||
testClusters.integTest {
|
|
||||||
// This is important, so that all the modules are available too.
|
// This is important, so that all the modules are available too.
|
||||||
// There are index templates that use token filters that are in analysis-module and
|
// There are index templates that use token filters that are in analysis-module and
|
||||||
// processors are being used that are in ingest-common module.
|
// processors are being used that are in ingest-common module.
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.elasticsearch.client.Response;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
import org.elasticsearch.common.util.concurrent.ThreadContext;
|
||||||
import org.elasticsearch.test.rest.ESRestTestCase;
|
import org.elasticsearch.test.rest.ESRestTestCase;
|
||||||
|
import org.hamcrest.Matchers;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
@ -19,7 +20,6 @@ import java.util.Map;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.instanceOf;
|
import static org.hamcrest.Matchers.instanceOf;
|
||||||
import static org.hamcrest.Matchers.is;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Integration test to test authentication with the custom role-mapping realm
|
* Integration test to test authentication with the custom role-mapping realm
|
||||||
|
@ -62,7 +62,7 @@ public class CustomRoleMappingRealmIT extends ESRestTestCase {
|
||||||
|
|
||||||
final Response response = client().performRequest(request);
|
final Response response = client().performRequest(request);
|
||||||
final Map<String, Object> authenticate = entityAsMap(response);
|
final Map<String, Object> authenticate = entityAsMap(response);
|
||||||
assertThat(authenticate.get("username"), is(CustomRoleMappingRealm.USERNAME));
|
assertThat(authenticate.get("username"), Matchers.is(CustomRoleMappingRealm.USERNAME));
|
||||||
assertThat(authenticate.get("roles"), instanceOf(List.class));
|
assertThat(authenticate.get("roles"), instanceOf(List.class));
|
||||||
assertThat(authenticate.get("roles"), equalTo(Collections.singletonList(expectedRole)));
|
assertThat(authenticate.get("roles"), equalTo(Collections.singletonList(expectedRole)));
|
||||||
}
|
}
|
|
@ -27,7 +27,6 @@ import java.util.Collections;
|
||||||
import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.INDEX;
|
import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.INDEX;
|
||||||
import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_A;
|
import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_A;
|
||||||
import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_B;
|
import static org.elasticsearch.example.role.CustomInMemoryRolesProvider.ROLE_B;
|
||||||
import static org.elasticsearch.xpack.core.security.authc.support.UsernamePasswordToken.basicAuthHeaderValue;
|
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +40,7 @@ public class CustomRolesProviderIT extends ESIntegTestCase {
|
||||||
static {
|
static {
|
||||||
RequestOptions.Builder options = RequestOptions.DEFAULT.toBuilder();
|
RequestOptions.Builder options = RequestOptions.DEFAULT.toBuilder();
|
||||||
options.addHeader(UsernamePasswordToken.BASIC_AUTH_HEADER,
|
options.addHeader(UsernamePasswordToken.BASIC_AUTH_HEADER,
|
||||||
basicAuthHeaderValue(TEST_USER, new SecureString(TEST_PWD.toCharArray())));
|
UsernamePasswordToken.basicAuthHeaderValue(TEST_USER, new SecureString(TEST_PWD.toCharArray())));
|
||||||
AUTH_OPTIONS = options.build();
|
AUTH_OPTIONS = options.build();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue