Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/8.x' into backport/8.x/pr-118691
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Dec 17, 2024
2 parents df72ff1 + 3066300 commit e13d2d3
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 247 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class RepositoryS3ImdsV1CredentialsRestIT extends AbstractRepositoryS3Res
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("repository-s3")
.setting("s3.client." + CLIENT + ".endpoint", s3Fixture::getAddress)
.systemProperty(Ec2ImdsHttpFixture.ENDPOINT_OVERRIDE_SYSPROP_NAME, ec2ImdsHttpFixture::getAddress)
.systemProperty("com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", ec2ImdsHttpFixture::getAddress)
.build();

@ClassRule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class RepositoryS3ImdsV2CredentialsRestIT extends AbstractRepositoryS3Res
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("repository-s3")
.setting("s3.client." + CLIENT + ".endpoint", s3Fixture::getAddress)
.systemProperty(Ec2ImdsHttpFixture.ENDPOINT_OVERRIDE_SYSPROP_NAME, ec2ImdsHttpFixture::getAddress)
.systemProperty("com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", ec2ImdsHttpFixture::getAddress)
.build();

@ClassRule
Expand Down
5 changes: 1 addition & 4 deletions plugins/discovery-ec2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.elasticsearch.gradle.internal.info.BuildParams
* License v3.0 only", or the "Server Side Public License, v 1".
*/
apply plugin: 'elasticsearch.internal-java-rest-test'
apply plugin: 'elasticsearch.internal-cluster-test'

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

javaRestTestImplementation project(':plugins:discovery-ec2')
javaRestTestImplementation project(':test:fixtures:ec2-imds-fixture')

internalClusterTestImplementation project(':test:fixtures:ec2-imds-fixture')
}

tasks.named("dependencyLicenses").configure {
Expand Down Expand Up @@ -87,7 +84,7 @@ tasks.register("writeTestJavaPolicy") {
}
}

tasks.withType(Test).configureEach {
tasks.named("test").configure {
dependsOn "writeTestJavaPolicy"
// this is needed for insecure plugins, remove if possible!
systemProperty 'tests.artifact', project.name
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

package org.elasticsearch.discovery.ec2;

import fixture.aws.imds.Ec2ImdsHttpFixture;

import org.elasticsearch.client.Request;
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
Expand All @@ -36,7 +34,7 @@ protected static ElasticsearchCluster buildCluster(Supplier<String> imdsFixtureA
return ElasticsearchCluster.local()
.plugin("discovery-ec2")
.setting(AwsEc2Service.AUTO_ATTRIBUTE_SETTING.getKey(), "true")
.systemProperty(Ec2ImdsHttpFixture.ENDPOINT_OVERRIDE_SYSPROP_NAME, imdsFixtureAddressSupplier)
.systemProperty("com.amazonaws.sdk.ec2MetadataServiceEndpointOverride", imdsFixtureAddressSupplier)
.build();
}

Expand Down
Loading

0 comments on commit e13d2d3

Please sign in to comment.