diff --git a/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/direct/TransportPutDatabaseConfigurationActionTests.java b/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/direct/TransportPutDatabaseConfigurationActionTests.java index 9660844326a26..9d325151e52ec 100644 --- a/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/direct/TransportPutDatabaseConfigurationActionTests.java +++ b/modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/direct/TransportPutDatabaseConfigurationActionTests.java @@ -18,6 +18,8 @@ import java.util.HashMap; import java.util.Map; +import static org.elasticsearch.cluster.ClusterName.DEFAULT; + public class TransportPutDatabaseConfigurationActionTests extends ESTestCase { public void testValidatePrerequisites() { @@ -25,7 +27,7 @@ public void testValidatePrerequisites() { // Test that we reject two configurations with the same database name but different ids: String name = randomAlphaOfLengthBetween(1, 50); IngestGeoIpMetadata ingestGeoIpMetadata = randomIngestGeoIpMetadata(name); - ClusterState state = ClusterState.builder(ClusterState.EMPTY_STATE) + ClusterState state = ClusterState.builder(DEFAULT) .putProjectMetadata(ProjectMetadata.builder(projectId).putCustom(IngestGeoIpMetadata.TYPE, ingestGeoIpMetadata).build()) .build(); DatabaseConfiguration databaseConfiguration = randomDatabaseConfiguration(randomIdentifier(), name); @@ -40,7 +42,11 @@ public void testValidatePrerequisites() { TransportPutDatabaseConfigurationAction.validatePrerequisites(projectId, databaseConfigurationForDifferentName, state); // Test that we do not reject a configuration if none already exists: - TransportPutDatabaseConfigurationAction.validatePrerequisites(projectId, databaseConfiguration, ClusterState.EMPTY_STATE); + TransportPutDatabaseConfigurationAction.validatePrerequisites( + projectId, + databaseConfiguration, + ClusterState.builder(DEFAULT).putProjectMetadata(ProjectMetadata.builder(projectId)).build() + ); // Test that we do not reject a configuration if one with the same database name AND id already exists: DatabaseConfiguration databaseConfigurationSameNameSameId = ingestGeoIpMetadata.getDatabases() diff --git a/muted-tests.yml b/muted-tests.yml index 52ca8071cc7ff..2c45093b9bde2 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -566,9 +566,6 @@ tests: issue: https://github.com/elastic/elasticsearch/issues/130145 - class: org.elasticsearch.xpack.logsdb.patternedtext.PatternedTextFieldMapperTests issue: https://github.com/elastic/elasticsearch/issues/130162 -- class: org.elasticsearch.ingest.geoip.direct.TransportPutDatabaseConfigurationActionTests - method: testValidatePrerequisites - issue: https://github.com/elastic/elasticsearch/issues/130178 - class: org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDiskSpaceTests method: testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution issue: https://github.com/elastic/elasticsearch/issues/130205