You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kh...@apache.org on 2017/09/13 22:11:44 UTC
[geode] branch develop updated: GEODE-3539: Add test for missing
coverage of status locator command
This is an automated email from the ASF dual-hosted git repository.
khowe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 13dfbb4 GEODE-3539: Add test for missing coverage of status locator command
13dfbb4 is described below
commit 13dfbb46cfd4fe94da0c1ac7da56995082b5a52e
Author: Ken Howe <kh...@pivotal.io>
AuthorDate: Thu Sep 7 09:38:17 2017 -0700
GEODE-3539: Add test for missing coverage of status locator command
Also removes some commented out code
---
.../internal/cli/shell/GfshExitCodeStatusCommandsTest.java | 13 +++++++++++++
.../lifecycle/GfshStatusCommandsIntegrationTest.java | 3 ---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshExitCodeStatusCommandsTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshExitCodeStatusCommandsTest.java
index bc309dd..4087e04 100755
--- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshExitCodeStatusCommandsTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/shell/GfshExitCodeStatusCommandsTest.java
@@ -182,6 +182,15 @@ public class GfshExitCodeStatusCommandsTest {
executeScriptWithExpectedExitCode(statusCommand, config, ExitCode.NORMAL);
}
+ @Test
+ public void onlineStatusCommandShouldFailWhenConnectedNonDefaultPort_locator_host() {
+ TestConfiguration config = LOCATOR_ONLINE_AND_CONNECTED;
+ config.startNecessaryMembers(startLocatorCommand(), startServerCommand(), gfsh);
+
+ String statusCommand = statusLocatorCommandByHost();
+ executeScriptWithExpectedExitCode(statusCommand, config, ExitCode.FATAL);
+ }
+
@Test
@@ -314,6 +323,10 @@ public class GfshExitCodeStatusCommandsTest {
.addOption("port", String.valueOf(locatorPort)).toString();
}
+ private String statusLocatorCommandByHost() {
+ return new CommandStringBuilder("status locator").addOption("host", "localhost").toString();
+ }
+
private String statusLocatorCommandByDir() {
String locatorDir = gfsh.getTemporaryFolder().getRoot().toPath().resolve(memberControllerName)
.resolve(locatorName).toAbsolutePath().toString();
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/lifecycle/GfshStatusCommandsIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/lifecycle/GfshStatusCommandsIntegrationTest.java
index dd5841f..fde0891 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/lifecycle/GfshStatusCommandsIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/lifecycle/GfshStatusCommandsIntegrationTest.java
@@ -34,13 +34,11 @@ import org.apache.geode.test.junit.categories.IntegrationTest;
@Category(IntegrationTest.class)
public class GfshStatusCommandsIntegrationTest {
final private static String LOCATOR_NAME = "locator1";
- // private int port;
@Rule
public LocatorStarterRule locator =
new LocatorStarterRule().withJMXManager().withName(LOCATOR_NAME).withAutoStart();
-
@Rule
public GfshShellConnectionRule gfsh = new GfshShellConnectionRule();
@@ -52,7 +50,6 @@ public class GfshStatusCommandsIntegrationTest {
@Before
public void connect() throws Exception {
- // port = getRandomAvailablePort(SOCKET);
gfsh.connectAndVerify(locator);
}
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].