@Override public boolean upgradeHub(List<String> updatedFlows) throws CantUpgradeException { boolean isHubInstalled = this.isInstalled().isInstalled(); String currentVersion = versions.getHubVersion();
@PostConstruct public void bootstrapHub() { boolean isInstalled = false; try { isInstalled = dataHub.isInstalled().isInstalled(); } catch(Exception e) { logger.info("Datahub is not installed"); } if(! isInstalled) { dataHub.install(); try { //dataHub.upgradeHub(); // this throws exception right now. } catch (Exception e) { logger.warn("Upgrade threw an exception during test bootstrapping"); } } }
@Test public void testInstallHubModules() throws IOException { assertTrue(getDataHub().isInstalled().isInstalled()); assertTrue(getModulesFile("/com.marklogic.hub/config.xqy").startsWith(getResource("data-hub-test/core-modules/config.xqy"))); assertTrue(getModulesFile("/Default/data-hub-JOBS/rest-api/options/traces.xml").length() > 0, "trace options not installed"); assertTrue(getModulesFile("/Default/data-hub-JOBS/rest-api/options/jobs.xml").length() > 0, "jobs options not installed"); assertTrue(getModulesFile("/Default/data-hub-STAGING/rest-api/options/default.xml").length() > 0,"staging options not installed"); assertTrue(getModulesFile("/Default/data-hub-FINAL/rest-api/options/default.xml").length() > 0, "final options not installed"); }
@Test public void testInstallHubModules() throws IOException { assertTrue(getDataHub().isInstalled().isInstalled()); assertTrue(getModulesFile("/com.marklogic.hub/config.xqy").startsWith(getResource("data-hub-test/core-modules/config.xqy"))); assertTrue(getModulesFile("/Default/data-hub-JOBS/rest-api/options/traces.xml").length() > 0, "trace options not installed"); assertTrue(getModulesFile("/Default/data-hub-JOBS/rest-api/options/jobs.xml").length() > 0, "jobs options not installed"); assertTrue(getModulesFile("/Default/data-hub-STAGING/rest-api/options/default.xml").length() > 0, "staging options not installed"); assertTrue(getModulesFile("/Default/data-hub-FINAL/rest-api/options/default.xml").length() > 0, "final options not installed"); }