Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -30,18 +30,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
map.put(LegacyRestTestBasePlugin.class, ":docs");
map.put(LegacyRestTestBasePlugin.class, ":distribution:docker");
map.put(LegacyRestTestBasePlugin.class, ":modules:reindex");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-icu");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-kuromoji");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-nori");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-phonetic");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-smartcn");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-stempel");
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-ukrainian");
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-azure-classic");
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-ec2");
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-gce");
map.put(LegacyRestTestBasePlugin.class, ":plugins:mapper-annotated-text");
map.put(LegacyRestTestBasePlugin.class, ":plugins:store-smb");
map.put(LegacyRestTestBasePlugin.class, ":qa:ccs-rolling-upgrade-remote-cluster");
map.put(LegacyRestTestBasePlugin.class, ":qa:mixed-cluster");
map.put(LegacyRestTestBasePlugin.class, ":qa:multi-cluster-search");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class BasePluginBuildPlugin implements Plugin<Project> {
public static final String BUNDLE_PLUGIN_TASK_NAME = "bundlePlugin";
public static final String EXPLODED_BUNDLE_PLUGIN_TASK_NAME = "explodedBundlePlugin";
public static final String EXPLODED_BUNDLE_CONFIG = "explodedBundleZip";
public static final Attribute<Boolean> EXPLODED_PLUGIN_BUNDLE_ATTRIBUTE = Attribute.of("exploded-plugin-bundle", Boolean.class);

protected final ProviderFactory providerFactory;

Expand Down Expand Up @@ -170,6 +171,7 @@ private TaskProvider<Zip> createBundleTasks(final Project project, PluginPropert
explodedBundleZip.setCanBeResolved(false);
explodedBundleZip.setCanBeConsumed(true);
explodedBundleZip.getAttributes().attribute(ArtifactTypeDefinition.ARTIFACT_TYPE_ATTRIBUTE, ArtifactTypeDefinition.DIRECTORY_TYPE);
explodedBundleZip.getAttributes().attribute(EXPLODED_PLUGIN_BUNDLE_ATTRIBUTE, true);
project.getArtifacts().add(EXPLODED_BUNDLE_CONFIG, explodedBundle);
return bundle;
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/analysis-icu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import org.elasticsearch.gradle.internal.info.BuildParams
* 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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 IcuClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-icu").build();

public IcuClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public IcuClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandid
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 2 additions & 2 deletions plugins/analysis-kuromoji/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 Japanese (kuromoji) Analysis plugin integrates Lucene kuromoji analysis module into elasticsearch.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 KuromojiClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-kuromoji").build();

public KuromojiClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public KuromojiClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testC
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 2 additions & 2 deletions plugins/analysis-nori/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 Korean (nori) Analysis plugin integrates Lucene nori analysis module into elasticsearch.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 NoriClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-nori").build();

public NoriClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public NoriClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandi
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 2 additions & 2 deletions plugins/analysis-phonetic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 PhoneticClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-phonetic").build();

public PhoneticClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public PhoneticClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testC
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 2 additions & 2 deletions plugins/analysis-smartcn/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 'Smart Chinese Analysis plugin integrates Lucene Smart Chinese analysis module into elasticsearch.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 SmartCNClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-smartcn").build();

public SmartCNClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public SmartCNClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCa
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 2 additions & 2 deletions plugins/analysis-stempel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 Stempel (Polish) Analysis plugin integrates Lucene stempel (polish) analysis module into elasticsearch.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 StempelClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-stempel").build();

public StempelClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public StempelClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCa
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 2 additions & 2 deletions plugins/analysis-ukrainian/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 Ukrainian Analysis plugin integrates the Lucene UkrainianMorfologikAnalyzer into elasticsearch.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 UkrainianClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("analysis-ukrainian").build();

public UkrainianClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public UkrainianClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate test
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

@Override
protected String getTestRestCluster() {
return cluster.getHttpAddresses();
}
}
4 changes: 0 additions & 4 deletions plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

subprojects {
apply plugin: 'elasticsearch.internal-testclusters'
}

configurations {
allPlugins
}
Expand Down
22 changes: 12 additions & 10 deletions plugins/discovery-azure-classic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import org.elasticsearch.gradle.internal.info.BuildParams
* 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'

import org.elasticsearch.gradle.LoggedExec

apply plugin: 'elasticsearch.internal-yaml-rest-test'
apply plugin: 'elasticsearch.internal-cluster-test'

esplugin {
Expand Down Expand Up @@ -50,14 +53,14 @@ restResources {
}
}

// needed to be consistent with ssl host checking
String host = InetAddress.getLoopbackAddress().getHostAddress()

// location of keystore and files to generate it
File keystore = new File(project.buildDir, 'keystore/test-node.jks')

// generate the keystore
TaskProvider createKey = tasks.register("createKey", LoggedExec) {
// needed to be consistent with ssl host checking
String host = InetAddress.getLoopbackAddress().getHostAddress()

// location of keystore and files to generate it
File keystore = project.layout.buildDirectory.file('keystore/test-node.jks').get().asFile

doFirst {
delete(keystore.parentFile)
keystore.parentFile.mkdirs()
Expand All @@ -75,10 +78,9 @@ TaskProvider createKey = tasks.register("createKey", LoggedExec) {
'-keypass', 'keypass',
'-storepass', 'keypass'
}
//no unit tests
tasks.named("test").configure { enabled = false }

// add keystore to test classpath: it expects it there
tasks.named("processInternalClusterTestResources").configure {
tasks.named("processInternalClusterTestResources") {
from createKey
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@
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 DiscoveryAzureClassicClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {

@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().plugin("discovery-azure-classic").build();

public DiscoveryAzureClassicClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCandidate testCandidate) {
super(testCandidate);
}
Expand All @@ -25,4 +30,9 @@ public DiscoveryAzureClassicClientYamlTestSuiteIT(@Name("yaml") ClientYamlTestCa
public static Iterable<Object[]> parameters() throws Exception {
return ESClientYamlSuiteTestCase.createParameters();
}

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