From 1a44c21c0902004d9dc9a3c410c25d17cc694963 Mon Sep 17 00:00:00 2001 From: Rob Rudin Date: Tue, 15 Mar 2016 10:14:06 -0400 Subject: [PATCH] #87 Added another test case --- .../servers/ManageOtherServerTest.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/test/java/com/marklogic/appdeployer/command/servers/ManageOtherServerTest.java b/src/test/java/com/marklogic/appdeployer/command/servers/ManageOtherServerTest.java index d49981cf..1ccffb4e 100644 --- a/src/test/java/com/marklogic/appdeployer/command/servers/ManageOtherServerTest.java +++ b/src/test/java/com/marklogic/appdeployer/command/servers/ManageOtherServerTest.java @@ -54,4 +54,30 @@ public void odbcAndXdbcServers() { assertFalse(mgr.exists("sample-app-odbc")); assertFalse(mgr.exists("sample-app")); } + + @Test + public void ignoreOdbcServer() { + appConfig.setConfigDir(new ConfigDir(new File("src/test/resources/sample-app/other-servers"))); + + ServerManager mgr = new ServerManager(manageClient); + + DeployOtherServersCommand c = new DeployOtherServersCommand(); + c.setIgnoreFilenames("odbc-server.json"); + initializeAppDeployer(c); + + appConfig.getCustomTokens().put("%%ODBC_PORT%%", "8048"); + appConfig.getCustomTokens().put("%%XDBC_PORT%%", "8049"); + appDeployer.deploy(appConfig); + + final String message = "Both the ODBC and REST API server files should have been ignored"; + assertTrue(mgr.exists("sample-app-xdbc")); + assertFalse(message, mgr.exists("sample-app-odbc")); + assertFalse(message, mgr.exists("sample-app")); + + appDeployer.undeploy(appConfig); + + assertFalse(mgr.exists("sample-app-xdbc")); + assertFalse(mgr.exists("sample-app-odbc")); + assertFalse(mgr.exists("sample-app")); + } }