Migrate mapper-related modules to internal-*-rest-test (#117298)
This commit is contained in:
parent
0d1979e0fe
commit
2b8e4e727c
|
@ -7,8 +7,8 @@
|
|||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
|
||||
esplugin {
|
||||
|
@ -21,9 +21,3 @@ restResources {
|
|||
include '_common', 'cluster', 'field_caps', 'nodes', 'indices', 'index', 'search', 'get'
|
||||
}
|
||||
}
|
||||
|
||||
if (buildParams.isSnapshotBuild() == false) {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,8 +12,10 @@ package org.elasticsearch.index.mapper;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
/** Runs yaml rest tests */
|
||||
public class MapperExtrasClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
|
@ -26,4 +28,12 @@ public class MapperExtrasClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return ESClientYamlSuiteTestCase.createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("mapper-extras").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
|
||||
esplugin {
|
||||
|
|
|
@ -12,8 +12,10 @@ package org.elasticsearch.join;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
public class ParentChildClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
public ParentChildClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
|
||||
|
@ -24,4 +26,12 @@ public class ParentChildClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("parent-join").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
|
||||
esplugin {
|
||||
|
|
|
@ -12,8 +12,10 @@ package org.elasticsearch.percolator;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
public class PercolatorClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
public PercolatorClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
|
||||
|
@ -24,4 +26,12 @@ public class PercolatorClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return ESClientYamlSuiteTestCase.createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("percolator").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,9 +15,9 @@ import org.elasticsearch.gradle.transform.UnzipTransform
|
|||
|
||||
apply plugin: 'elasticsearch.test-with-dependencies'
|
||||
apply plugin: 'elasticsearch.jdk-download'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-java-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
|
||||
esplugin {
|
||||
|
@ -32,7 +32,6 @@ testClusters.configureEach {
|
|||
module ':modules:rest-root'
|
||||
// Whitelist reindexing from the local node so we can test reindex-from-remote.
|
||||
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
||||
requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -41,6 +40,10 @@ dependencies {
|
|||
// for parent/child testing
|
||||
testImplementation project(':modules:parent-join')
|
||||
testImplementation project(':modules:rest-root')
|
||||
|
||||
clusterModules project(':modules:lang-painless')
|
||||
clusterModules project(':modules:parent-join')
|
||||
clusterModules project(":modules:rest-root")
|
||||
}
|
||||
|
||||
restResources {
|
||||
|
|
|
@ -18,7 +18,6 @@ import java.io.IOException;
|
|||
import static org.hamcrest.CoreMatchers.containsString;
|
||||
|
||||
public class ReindexWithoutContentIT extends ESRestTestCase {
|
||||
|
||||
public void testReindexMissingBody() throws IOException {
|
||||
ResponseException responseException = expectThrows(
|
||||
ResponseException.class,
|
||||
|
|
|
@ -12,8 +12,10 @@ package org.elasticsearch.index.reindex;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
public class ReindexClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
public ReindexClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
|
||||
|
@ -24,4 +26,18 @@ public class ReindexClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return ESClientYamlSuiteTestCase.createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
|
||||
.module("reindex")
|
||||
.module("lang-painless")
|
||||
.module("parent-join")
|
||||
.module("rest-root")
|
||||
.setting("reindex.remote.whitelist", "127.0.0.1:*")
|
||||
.build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,20 +6,14 @@
|
|||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
|
||||
esplugin {
|
||||
description 'The Mapper Annotated_text plugin adds support for text fields with markup used to inject annotation tokens into the index.'
|
||||
classname 'org.elasticsearch.index.mapper.annotatedtext.AnnotatedTextPlugin'
|
||||
}
|
||||
|
||||
if (buildParams.isSnapshotBuild() == false) {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
}
|
||||
|
||||
restResources {
|
||||
restApi {
|
||||
include '_common', 'indices', 'index', 'search'
|
||||
|
|
|
@ -12,8 +12,10 @@ package org.elasticsearch.index.mapper.annotatedtext;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
public class AnnotatedTextClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
|
||||
|
@ -25,4 +27,12 @@ public class AnnotatedTextClientYamlTestSuiteIT extends ESClientYamlSuiteTestCas
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("mapper-annotated-text").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
|
||||
esplugin {
|
||||
description 'The Mapper Murmur3 plugin allows to compute hashes of a field\'s values at index-time and to store them in the index.'
|
||||
|
@ -18,12 +18,7 @@ esplugin {
|
|||
dependencies {
|
||||
compileOnly project(':modules:lang-painless:spi')
|
||||
testImplementation project(':modules:lang-painless')
|
||||
}
|
||||
|
||||
if (buildParams.isSnapshotBuild() == false) {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
clusterModules project(':modules:lang-painless')
|
||||
}
|
||||
|
||||
restResources {
|
||||
|
@ -31,8 +26,3 @@ restResources {
|
|||
include '_common', 'indices', 'index', 'search'
|
||||
}
|
||||
}
|
||||
|
||||
testClusters.configureEach {
|
||||
testDistribution = 'DEFAULT'
|
||||
setting 'xpack.security.enabled', 'false'
|
||||
}
|
||||
|
|
|
@ -12,8 +12,10 @@ package org.elasticsearch.index.mapper.murmur3;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
public class MapperMurmur3ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
|
||||
|
@ -25,4 +27,12 @@ public class MapperMurmur3ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCas
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("lang-painless").plugin("mapper-murmur3").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ import org.elasticsearch.gradle.Version
|
|||
evaluationDependsOn(xpackModule('core'))
|
||||
|
||||
apply plugin: 'elasticsearch.internal-es-plugin'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
|
||||
esplugin {
|
||||
name 'unsigned-long'
|
||||
|
@ -35,13 +35,3 @@ restResources {
|
|||
include '_common', 'bulk', 'indices', 'index', 'search', 'xpack'
|
||||
}
|
||||
}
|
||||
|
||||
if (buildParams.isSnapshotBuild() == false) {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
}
|
||||
|
||||
testClusters.configureEach {
|
||||
requiresFeature 'es.index_mode_feature_flag_registered', Version.fromString("8.0.0")
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ package org.elasticsearch.xpack.unsignedlong;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
/** Runs yaml rest tests */
|
||||
public class UnsignedLongClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
|
@ -24,4 +26,12 @@ public class UnsignedLongClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return ESClientYamlSuiteTestCase.createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("unsigned-long").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
evaluationDependsOn(xpackModule('core'))
|
||||
|
||||
apply plugin: 'elasticsearch.internal-es-plugin'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.yaml-rest-compat-test'
|
||||
apply plugin: 'elasticsearch.internal-cluster-test'
|
||||
|
||||
esplugin {
|
||||
|
@ -29,8 +29,3 @@ dependencies {
|
|||
testImplementation project(path: xpackModule('analytics'))
|
||||
}
|
||||
|
||||
if (buildParams.isSnapshotBuild() == false) {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ package org.elasticsearch.xpack.versionfield;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
/** Runs yaml rest tests */
|
||||
public class VersionClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
|
@ -24,4 +26,12 @@ public class VersionClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return ESClientYamlSuiteTestCase.createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("mapper-version").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
apply plugin: 'elasticsearch.internal-es-plugin'
|
||||
apply plugin: 'elasticsearch.legacy-yaml-rest-test'
|
||||
apply plugin: 'elasticsearch.internal-yaml-rest-test'
|
||||
|
||||
esplugin {
|
||||
name 'wildcard'
|
||||
|
@ -24,9 +24,3 @@ dependencies {
|
|||
compileOnly project(path: xpackModule('core'))
|
||||
testImplementation(testArtifact(project(xpackModule('core'))))
|
||||
}
|
||||
|
||||
if (buildParams.isSnapshotBuild() == false) {
|
||||
tasks.named("test").configure {
|
||||
systemProperty 'es.index_mode_feature_flag_registered', 'true'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ package org.elasticsearch.xpack.wildcard;
|
|||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
||||
import org.elasticsearch.test.cluster.ElasticsearchCluster;
|
||||
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
|
||||
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
|
||||
import org.junit.ClassRule;
|
||||
|
||||
/** Runs yaml rest tests */
|
||||
public class WildcardClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
||||
|
@ -24,4 +26,12 @@ public class WildcardClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
|
|||
public static Iterable<Object[]> parameters() throws Exception {
|
||||
return ESClientYamlSuiteTestCase.createParameters();
|
||||
}
|
||||
|
||||
@ClassRule
|
||||
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("wildcard").build();
|
||||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return cluster.getHttpAddresses();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue