diff --git a/integration-tests/src/test/java/org/openmrs/maven/plugins/DeployIT.java b/integration-tests/src/test/java/org/openmrs/maven/plugins/DeployIT.java index 05d4cee3..d24953af 100644 --- a/integration-tests/src/test/java/org/openmrs/maven/plugins/DeployIT.java +++ b/integration-tests/src/test/java/org/openmrs/maven/plugins/DeployIT.java @@ -96,6 +96,30 @@ public void deploy_shouldDowngradeDistroTo2_1() throws Exception { assertThat(server, serverHasVersion("2.1")); } + @Test + public void deploy_shouldUpgradeDistroTo2_13_0() throws Exception { + testServerId = setupTestServer("referenceapplication:2.3.1"); + addAnswer(testServerId); + addAnswer("Distribution"); + addAnswer("referenceapplication:2.13.0"); + addAnswer("y"); + executeTask("deploy"); + assertSuccess(); + assertFilePresent(testServerId, "openmrs-2.5.9.war"); + Properties properties = PropertiesUtils.loadPropertiesFromResource("integration-test/distributions/referenceapplication-package-2.13.0.properties"); + if ("2.2.6".equals(properties.get("omod.atlas"))) { + properties.setProperty("omod.atlas", "2.2.7"); + } + DistroProperties distroProperties = new DistroProperties(properties); + assertOnlyModulesInstalled(testServerId, distroProperties); + assertPlatformUpdated(testServerId, "2.5.9"); + assertFilePresent(testServerId, "owa"); + assertFilePresent(testServerId, "owa", "SystemAdministration.owa"); + Server.setServersPath(testDirectory.getAbsolutePath()); + Server server = Server.loadServer(testServerId); + assertThat(server, serverHasVersion("2.13.0")); + } + @Test public void deploy_shouldUpgradeDistroTo3_0_0() throws Exception { testServerId = setupTestServer("referenceapplication:2.2");