@Test public void upgrade300To403ToCurrentVersion() throws Exception { final String projectPath = "build/tmp/upgrade-projects/dhf403from300"; final File projectDir = Paths.get(projectPath).toFile(); FileUtils.deleteDirectory(projectDir); FileUtils.copyDirectory(Paths.get("src/test/resources/upgrade-projects/dhf403from300").toFile(), projectDir); HubProjectImpl hubProject = new HubProjectImpl(); hubProject.createProject(projectPath); // The tokens map doesn't seem to matter for what we're testing here hubProject.init(new HashMap<>()); hubProject.upgradeProject(); File srcDir = new File(projectDir, "src"); File mainDir = new File(srcDir, "main"); File internalConfigDir = new File(mainDir, "hub-internal-config"); verifyInternalDatabases(internalConfigDir); verifyInternalServers(internalConfigDir); File configDir = new File(mainDir, "ml-config"); verifyUserDatabases(configDir); verifyUserServers(configDir); }
@Test public void upgrade300ToCurrentVersion() throws Exception { final String projectPath = "build/tmp/upgrade-projects/dhf300"; final File projectDir = Paths.get(projectPath).toFile(); FileUtils.deleteDirectory(projectDir); FileUtils.copyDirectory(Paths.get("src/test/resources/upgrade-projects/dhf300").toFile(), projectDir); HubProjectImpl hubProject = new HubProjectImpl(); hubProject.createProject(projectPath); // The tokens map doesn't seem to matter for what we're testing here hubProject.init(new HashMap<>()); hubProject.upgradeProject(); File srcDir = new File(projectDir, "src"); File mainDir = new File(srcDir, "main"); File internalConfigDir = new File(mainDir, "hub-internal-config"); verifyInternalDatabases(internalConfigDir); verifyInternalServers(internalConfigDir); File configDir = new File(mainDir, "ml-config"); verifyUserDatabases(configDir); verifyUserServers(configDir); }