Skip to content

Commit

Permalink
Remove usage of deprecated search.remote settings.
Browse files Browse the repository at this point in the history
Ref: opensearch-project/OpenSearch#1870

Signed-off-by: Yury Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Jun 9, 2022
1 parent a021357 commit b9a0f40
Showing 1 changed file with 4 additions and 36 deletions.
40 changes: 4 additions & 36 deletions tests/Tests/Cluster/RemoteInfo/RemoteInfoApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
using Tests.Domain;
using Tests.Framework.EndpointTests;
using Tests.Framework.EndpointTests.TestState;
using M = System.Collections.Generic.Dictionary<string, object>;
using static OpenSearch.Client.Infer;

namespace Tests.Cluster.RemoteInfo
Expand All @@ -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();

Expand Down

0 comments on commit b9a0f40

Please sign in to comment.