Adjust main response constructor arguments
This commit adjusts the invocation of the main response constructor as these were changed upstream to remove a parameter. Original commit: elastic/x-pack-elasticsearch@846b33c9e9
This commit is contained in:
parent
1d525f998c
commit
5c48fc4eaa
|
@ -28,7 +28,7 @@ public class CliSessionTests extends ESTestCase {
|
|||
public void testProperConnection() throws Exception {
|
||||
HttpClient httpClient = mock(HttpClient.class);
|
||||
when(httpClient.serverInfo()).thenReturn(new MainResponse(randomAlphaOfLength(5), org.elasticsearch.Version.CURRENT,
|
||||
ClusterName.DEFAULT, UUIDs.randomBase64UUID(), Build.CURRENT, randomBoolean()));
|
||||
ClusterName.DEFAULT, UUIDs.randomBase64UUID(), Build.CURRENT));
|
||||
CliSession cliSession = new CliSession(httpClient);
|
||||
cliSession.checkConnection();
|
||||
verify(httpClient, times(1)).serverInfo();
|
||||
|
@ -58,7 +58,7 @@ public class CliSessionTests extends ESTestCase {
|
|||
}
|
||||
when(httpClient.serverInfo()).thenReturn(new MainResponse(randomAlphaOfLength(5),
|
||||
org.elasticsearch.Version.fromString(major + "." + minor + ".23"),
|
||||
ClusterName.DEFAULT, UUIDs.randomBase64UUID(), Build.CURRENT, randomBoolean()));
|
||||
ClusterName.DEFAULT, UUIDs.randomBase64UUID(), Build.CURRENT));
|
||||
CliSession cliSession = new CliSession(httpClient);
|
||||
expectThrows(ClientException.class, cliSession::checkConnection);
|
||||
verify(httpClient, times(1)).serverInfo();
|
||||
|
|
|
@ -36,7 +36,7 @@ public class ServerInfoCliCommandTests extends ESTestCase {
|
|||
HttpClient client = mock(HttpClient.class);
|
||||
CliSession cliSession = new CliSession(client);
|
||||
when(client.serverInfo()).thenReturn(new MainResponse("my_node", org.elasticsearch.Version.fromString("1.2.3"),
|
||||
new ClusterName("my_cluster"), UUIDs.randomBase64UUID(), Build.CURRENT, randomBoolean()));
|
||||
new ClusterName("my_cluster"), UUIDs.randomBase64UUID(), Build.CURRENT));
|
||||
ServerInfoCliCommand cliCommand = new ServerInfoCliCommand();
|
||||
assertTrue(cliCommand.handle(testTerminal, cliSession, "info"));
|
||||
assertEquals(testTerminal.toString(), "Node:<em>my_node</em> Cluster:<em>my_cluster</em> Version:<em>1.2.3</em>\n");
|
||||
|
|
Loading…
Reference in New Issue