@Test public void testStacksServicesDir() { System.clearProperty(GatewayConfigImpl.GATEWAY_HOME_VAR); GatewayConfig config = new GatewayConfigImpl(); assertThat(config.getGatewayServicesDir(), Matchers.endsWith("data/services")); String homeDirName = getHomeDirName("conf-demo/conf/gateway-site.xml"); System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName); config = new GatewayConfigImpl(); assertEquals("target/test", config.getGatewayServicesDir()); }
public void cleanup() throws Exception { gateway.stop(); FileUtils.deleteQuietly(new File(config.getGatewayTopologyDir())); FileUtils.deleteQuietly(new File(config.getGatewayConfDir())); FileUtils.deleteQuietly(new File(config.getGatewaySecurityDir())); FileUtils.deleteQuietly(new File(config.getGatewayDeploymentDir())); FileUtils.deleteQuietly(new File(config.getGatewayDataDir())); FileUtils.deleteQuietly(new File(config.getGatewayServicesDir())); for (Service service : services.values()) { service.server.stop(); } services.clear(); ldap.stop(true); }