You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2024/06/12 13:59:07 UTC
(cloudstack) branch main updated: test update and get connected hosts (#9136)
This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 64593574d88 test update and get connected hosts (#9136)
64593574d88 is described below
commit 64593574d88acf82f9861e2dc39fe24b4822126e
Author: Charles Weng <hu...@proton.me>
AuthorDate: Wed Jun 12 06:59:01 2024 -0700
test update and get connected hosts (#9136)
---
agent/src/test/java/com/cloud/agent/AgentShellTest.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/agent/src/test/java/com/cloud/agent/AgentShellTest.java b/agent/src/test/java/com/cloud/agent/AgentShellTest.java
index f7151779f58..4126692546f 100644
--- a/agent/src/test/java/com/cloud/agent/AgentShellTest.java
+++ b/agent/src/test/java/com/cloud/agent/AgentShellTest.java
@@ -350,4 +350,16 @@ public class AgentShellTest {
Mockito.verify(agentShellSpy).setHosts(expected);
}
+
+ @Test
+ public void updateAndGetConnectedHost() {
+ String expected = "test";
+
+ AgentShell shell = new AgentShell();
+ shell.setHosts("test");
+ shell.getNextHost();
+ shell.updateConnectedHost();
+
+ Assert.assertEquals(expected, shell.getConnectedHost());
+ }
}