Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n1v0lg committed Nov 30, 2023
1 parent 324f84e commit ac53bcb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeUtils;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.settings.SecureString;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.TransportAddress;
import org.elasticsearch.common.util.concurrent.ThreadContext;
Expand Down Expand Up @@ -124,7 +125,7 @@ public void testRewriteHandshakeAction() throws IOException {
final Transport.Connection connection = mock(Transport.Connection.class);
final String clusterAlias = randomAlphaOfLengthBetween(3, 8);
final RemoteClusterCredentialsManager credentialsResolver = mock(RemoteClusterCredentialsManager.class);
when(credentialsResolver.hasCredentials(clusterAlias)).thenReturn(true);
when(credentialsResolver.resolveCredentials(clusterAlias)).thenReturn(new SecureString(randomAlphaOfLength(42)));
final Transport.Connection wrappedConnection = RemoteConnectionManager.wrapConnectionWithRemoteClusterInfo(
connection,
clusterAlias,
Expand Down

0 comments on commit ac53bcb

Please sign in to comment.