@BeforeEach public void setup() { deleteProjectDir(); createProjectDir(); dataHub.initProject(); }
@BeforeEach public void setup() throws IOException, URISyntaxException { XMLUnit.setIgnoreWhitespace(true); enableDebugging(); clearDatabases(HubConfig.DEFAULT_STAGING_NAME, HubConfig.DEFAULT_JOB_NAME, HubConfig.DEFAULT_FINAL_NAME); clearUserModules(); deleteProjectDir(); createProjectDir(); dataHub.initProject(); FileUtils.copyDirectory( new File("src/test/resources/tracing-test/plugins"), new File(PROJECT_PATH + "/plugins") ); installUserModules(adminHubConfig, true); //Disable tracing that may have been enabled in previous tests Tracing.create(flowRunnerClient).disable(); }
@PostConstruct public void teardownHub() { super.init(); dataHub.initProject(); dataHub.uninstall(); if (isCertAuth() || isSslRun()) {
/** * Installs the data hub configuration and server-side config files into MarkLogic * * @param listener - the callback method to receive status updates */ @Override public void install(HubDeployStatusListener listener) { if (!hubConfig.getHubProject().isInitialized()) { initProject(); } logger.warn("Installing the Data Hub into MarkLogic"); // in AWS setting this fails... // for now putting in try/catch try { AppConfig roleConfig = hubConfig.getAppConfig(); SimpleAppDeployer roleDeployer = new SimpleAppDeployer(getManageClient(), getAdminManager()); roleDeployer.setCommands(getSecurityCommandList()); roleDeployer.deploy(roleConfig); } catch (HttpServerErrorException e) { if (e.getStatusCode() == HttpStatus.SERVICE_UNAVAILABLE) { logger.warn("No manage client for security installs. Assuming DHS provisioning already threre"); } else { throw new DataHubConfigurationException(e); } } HubAppDeployer finalDeployer = new HubAppDeployer(getManageClient(), getAdminManager(), listener, hubConfig.newStagingClient()); finalDeployer.setCommands(buildListOfCommands()); finalDeployer.deploy(hubConfig.getAppConfig()); }