diff --git a/plugins/discovery-ec2/build.gradle b/plugins/discovery-ec2/build.gradle index 169b4388d464f..2335577225340 100644 --- a/plugins/discovery-ec2/build.gradle +++ b/plugins/discovery-ec2/build.gradle @@ -6,7 +6,6 @@ * 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.internal-cluster-test' apply plugin: 'elasticsearch.internal-java-rest-test' esplugin { diff --git a/plugins/discovery-ec2/src/internalClusterTest/java/org/elasticsearch/discovery/ec2/AbstractAwsTestCase.java b/plugins/discovery-ec2/src/internalClusterTest/java/org/elasticsearch/discovery/ec2/AbstractAwsTestCase.java deleted file mode 100644 index 6225fcb52df5d..0000000000000 --- a/plugins/discovery-ec2/src/internalClusterTest/java/org/elasticsearch/discovery/ec2/AbstractAwsTestCase.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side - * Public License v 1"; you may not use this file except in compliance with, at - * your election, the "Elastic License 2.0", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -package org.elasticsearch.discovery.ec2; - -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.SettingsException; -import org.elasticsearch.core.PathUtils; -import org.elasticsearch.env.Environment; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.test.ESIntegTestCase.ThirdParty; - -import java.io.IOException; -import java.util.Arrays; -import java.util.Collection; - -/** - * Base class for AWS tests that require credentials. - *
- * You must specify {@code -Dtests.thirdparty=true -Dtests.config=/path/to/config}
- * in order to run these tests.
- */
-@ThirdParty
-public abstract class AbstractAwsTestCase extends ESIntegTestCase {
-
- @Override
- protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) {
- Settings.Builder settings = Settings.builder()
- .put(super.nodeSettings(nodeOrdinal, otherSettings))
- .put(Environment.PATH_HOME_SETTING.getKey(), createTempDir());
-
- // if explicit, just load it and don't load from env
- try {
- if (Strings.hasText(System.getProperty("tests.config"))) {
- try {
- settings.loadFromPath(PathUtils.get(System.getProperty("tests.config")));
- } catch (IOException e) {
- throw new IllegalArgumentException("could not load aws tests config", e);
- }
- } else {
- throw new IllegalStateException(
- "to run integration tests, you need to set -Dtests.thirdparty=true and -Dtests.config=/path/to/elasticsearch.yml"
- );
- }
- } catch (SettingsException exception) {
- throw new IllegalStateException("your test configuration file is incorrect: " + System.getProperty("tests.config"), exception);
- }
- return settings.build();
- }
-
- @Override
- protected Collection
- * These are tests, which require a third-party service in order to run. They
- * may require the user to manually configure an external process (such as rabbitmq),
- * or may additionally require some external configuration (e.g. AWS credentials)
- * via the {@code tests.config} system property.
- */
- @Inherited
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.TYPE)
- @TestGroup(enabled = false, sysProperty = ESIntegTestCase.SYSPROP_THIRDPARTY)
- public @interface ThirdParty {
- }
-
/** node names of the corresponding clusters will start with these prefixes */
public static final String SUITE_CLUSTER_NODE_PREFIX = "node_s";
public static final String TEST_CLUSTER_NODE_PREFIX = "node_t";