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")); + } }