Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ dependencies {
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")

clusterModules project(xpackModule('deprecation'))
clusterModules project(':x-pack:plugin:deprecation:qa:rest')
clusterPlugins project(':x-pack:plugin:deprecation:qa::early-deprecation-rest')
}

// let the javaRestTest see the classpath of main
GradleUtils.extendSourceSet(project, "main", "javaRestTest", tasks.named("javaRestTest"))

tasks.named('javaRestTest') {
usesDefaultDistribution("to be triaged")
}

restResources {
restApi {
include '_common', 'indices', 'index'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.junit.ClassRule;

Expand All @@ -39,16 +40,20 @@ public class EarlyDeprecationIndexingIT extends ESRestTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("x-pack-deprecation")
.module("deprecation-test-plugin")
.distribution(DistributionType.DEFAULT)
.plugin("deprecation-test-plugin")
.setting("xpack.security.enabled", "false")
.setting("xpack.license.self_generated.type", "trial")
.setting("cluster.deprecation_indexing.enabled", "true")
.setting("cluster.deprecation_indexing.flush_interval", "1ms")
.setting("logger.org.elasticsearch.xpack.deprecation","TRACE")
.setting("logger.org.elasticsearch.xpack.deprecation.logging","TRACE")
.setting("logger.org.elasticsearch.xpack.deprecation", "TRACE")
.setting("logger.org.elasticsearch.xpack.deprecation.logging", "TRACE")
.build();

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}

/**
* In EarlyDeprecationTestPlugin#onNodeStarted we simulate a very early deprecation that can happen before the template is loaded
Expand Down
9 changes: 6 additions & 3 deletions x-pack/plugin/deprecation/qa/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ dependencies {
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
javaRestTestImplementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")

clusterModules project(xpackModule('deprecation'))
clusterModules project(':x-pack:plugin:deprecation:qa:rest')
clusterModules project(':x-pack:plugin:ml')
clusterPlugins project(':x-pack:plugin:deprecation:qa:rest')
}

// let the javaRestTest see the classpath of main
Expand All @@ -37,6 +35,11 @@ restResources {
}
}

tasks.named('javaRestTest') {
usesDefaultDistribution("to be triaged")
}


// Test clusters run with security disabled
tasks.named("javaRestTest") {
buildParams.withFipsEnabledOnly(it)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.core.RestApiVersion;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.json.JsonXContent;
Expand Down Expand Up @@ -66,8 +67,8 @@ public class DeprecationHttpIT extends ESRestTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("x-pack-deprecation")
.module("deprecation-test-plugin")
.distribution(DistributionType.DEFAULT)
.plugin("deprecation-test-plugin")
.setting("cluster.deprecation_indexing.enabled", "true")
.setting("cluster.deprecation_indexing.flush_interval", "100ms")
.setting("xpack.security.enabled", "false")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.xcontent.NamedXContentRegistry;
import org.junit.After;
Expand All @@ -32,9 +33,8 @@ public class MlDeprecationIT extends ESRestTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("x-pack-deprecation")
.module("deprecation-test-plugin")
.module("x-pack-ml")
.distribution(DistributionType.DEFAULT)
.plugin("deprecation-test-plugin")
.setting("cluster.deprecation_indexing.enabled", "true")
.setting("cluster.deprecation_indexing.flush_interval", "100ms")
.setting("xpack.security.enabled", "false")
Expand Down