/** * Sets a configuration file property for the container's configuration * * This function is currently only used to specify a different context.xml file from the one * located in the installations 'conf' folder. * * @param filePath The path to the new configuration file * @param configDirDest The name of the directory that the configuration file be placed in * @param configFileDestName The name of destination file for the new configuration file */ private void setConfigFile(String filePath, String configDirDest, String configFileDestName) { FileConfig configFile = new FileConfig(); configFile.setFile(filePath); configFile.setToDir(configDirDest); configFile.setToFile(configFileDestName); getConfiguration().setConfigFileProperty(configFile); } }
localConfiguration.setConfigFileProperty(fileConfig);
localConfiguration.setConfigFileProperty(configfile);
localConfiguration.setConfigFileProperty(configfile);
/** * {@inheritDoc} */ @Override public void startAndStop(URL warPingURL) { String testFileName = "cargo-test/test.file"; File testFile = new File(getLocalContainer().getConfiguration().getHome(), testFileName); assertFalse("File " + testFile + " already exists", testFile.exists()); FileConfig fileConfig = new FileConfig(); fileConfig.setFile(getTestData().getTestDataFileFor("simple-war")); fileConfig.setToFile(testFileName); getLocalContainer().getConfiguration().setConfigFileProperty(fileConfig); getLocalContainer().start(); PingUtils.assertPingTrue(warPingURL.getPath() + " not started", warPingURL, getLogger()); // CARGO-1195: DeployableFiles should be setup for ExistingLocalConfiguration assertTrue("File " + testFile + " was not configured", testFile.exists()); getLocalContainer().stop(); PingUtils.assertPingFalse(warPingURL.getPath() + " not stopped", warPingURL, getLogger()); }