Skip to content

Commit 3066300

Browse files
committed
Revert "Add integ test for EC2 special network addresses (#118560) (#118616)"
This reverts commit 788cac4.
1 parent 788cac4 commit 3066300

File tree

11 files changed

+195
-247
lines changed

11 files changed

+195
-247
lines changed

modules/repository-s3/src/javaRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ImdsV1CredentialsRestIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class RepositoryS3ImdsV1CredentialsRestIT extends AbstractRepositoryS3Res
4444
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
4545
.module("repository-s3")
4646
.setting("s3.client." + CLIENT + ".endpoint", s3Fixture::getAddress)
47-
.systemProperty(Ec2ImdsHttpFixture.ENDPOINT_OVERRIDE_SYSPROP_NAME, ec2ImdsHttpFixture::getAddress)
47+
.systemProperty("com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", ec2ImdsHttpFixture::getAddress)
4848
.build();
4949

5050
@ClassRule

modules/repository-s3/src/javaRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ImdsV2CredentialsRestIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class RepositoryS3ImdsV2CredentialsRestIT extends AbstractRepositoryS3Res
4444
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
4545
.module("repository-s3")
4646
.setting("s3.client." + CLIENT + ".endpoint", s3Fixture::getAddress)
47-
.systemProperty(Ec2ImdsHttpFixture.ENDPOINT_OVERRIDE_SYSPROP_NAME, ec2ImdsHttpFixture::getAddress)
47+
.systemProperty("com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", ec2ImdsHttpFixture::getAddress)
4848
.build();
4949

5050
@ClassRule

plugins/discovery-ec2/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import org.elasticsearch.gradle.internal.info.BuildParams
99
* License v3.0 only", or the "Server Side Public License, v 1".
1010
*/
1111
apply plugin: 'elasticsearch.internal-java-rest-test'
12-
apply plugin: 'elasticsearch.internal-cluster-test'
1312

1413
esplugin {
1514
description 'The EC2 discovery plugin allows to use AWS API for the unicast discovery mechanism.'
@@ -32,8 +31,6 @@ dependencies {
3231

3332
javaRestTestImplementation project(':plugins:discovery-ec2')
3433
javaRestTestImplementation project(':test:fixtures:ec2-imds-fixture')
35-
36-
internalClusterTestImplementation project(':test:fixtures:ec2-imds-fixture')
3734
}
3835

3936
tasks.named("dependencyLicenses").configure {
@@ -87,7 +84,7 @@ tasks.register("writeTestJavaPolicy") {
8784
}
8885
}
8986

90-
tasks.withType(Test).configureEach {
87+
tasks.named("test").configure {
9188
dependsOn "writeTestJavaPolicy"
9289
// this is needed for insecure plugins, remove if possible!
9390
systemProperty 'tests.artifact', project.name

plugins/discovery-ec2/src/internalClusterTest/java/org/elasticsearch/discovery/ec2/DiscoveryEc2NetworkAddressesTestCase.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

plugins/discovery-ec2/src/internalClusterTest/java/org/elasticsearch/discovery/ec2/DiscoveryEc2RegularNetworkAddressesIT.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

plugins/discovery-ec2/src/internalClusterTest/java/org/elasticsearch/discovery/ec2/DiscoveryEc2SpecialNetworkAddressesIT.java

Lines changed: 0 additions & 77 deletions
This file was deleted.

plugins/discovery-ec2/src/javaRestTest/java/org/elasticsearch/discovery/ec2/DiscoveryEc2AvailabilityZoneAttributeTestCase.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
package org.elasticsearch.discovery.ec2;
1111

12-
import fixture.aws.imds.Ec2ImdsHttpFixture;
13-
1412
import org.elasticsearch.client.Request;
1513
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
1614
import org.elasticsearch.test.cluster.ElasticsearchCluster;
@@ -36,7 +34,7 @@ protected static ElasticsearchCluster buildCluster(Supplier<String> imdsFixtureA
3634
return ElasticsearchCluster.local()
3735
.plugin("discovery-ec2")
3836
.setting(AwsEc2Service.AUTO_ATTRIBUTE_SETTING.getKey(), "true")
39-
.systemProperty(Ec2ImdsHttpFixture.ENDPOINT_OVERRIDE_SYSPROP_NAME, imdsFixtureAddressSupplier)
37+
.systemProperty("com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", imdsFixtureAddressSupplier)
4038
.build();
4139
}
4240

0 commit comments

Comments
 (0)