diff --git a/tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs b/tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs index 297aaabff9..8463be0263 100644 --- a/tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs +++ b/tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs @@ -33,7 +33,6 @@ using Tests.Domain; using Tests.Framework.EndpointTests; using Tests.Framework.EndpointTests.TestState; -using M = System.Collections.Generic.Dictionary; using static OpenSearch.Client.Infer; namespace Tests.Cluster.RemoteInfo @@ -50,44 +49,13 @@ public RemoteInfoApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : base(c protected override void IntegrationSetup(IOpenSearchClient client, CallUniqueValues values) { - var oldWay = new M + var enableRemoteClusters = client.Cluster.PutSettings(new ClusterPutSettingsRequest { + Transient = new RemoteClusterConfiguration() { - "search", new M - { - { - "remote", new M - { - { - "cluster_one", new M - { - { "seeds", new[] { "127.0.0.1:9300", "127.0.0.1:9301" } } - } - }, - { - "cluster_two", new M - { - { "seeds", new[] { "127.0.0.1:9300" } } - } - } - } - } - } + { "cluster_one", "127.0.0.1:9300", "127.0.0.1:9301" }, + { "cluster_two", "127.0.0.1:9300" } } - }; - /** - * You can also use the following helper class which uses - * the new way to configure remote clusters. - */ - // ReSharper disable once UnusedVariable - var newWay = new RemoteClusterConfiguration() - { - { "cluster_one", "127.0.0.1:9300", "127.0.0.1:9301" }, - { "cluster_two", "127.0.0.1:9300" } - }; - var enableRemoteClusters = client.Cluster.PutSettings(new ClusterPutSettingsRequest - { - Transient = oldWay }); enableRemoteClusters.ShouldBeValid();