Search in sources :

Example 1 with Upgrade471to480

use of com.cloud.upgrade.dao.Upgrade471to480 in project cloudstack by apache.

the class DatabaseUpgradeCheckerTest method testFindUpgradePath452to490.

@Test
public void testFindUpgradePath452to490() {
    final CloudStackVersion dbVersion = CloudStackVersion.parse("4.5.2");
    assertNotNull(dbVersion);
    final CloudStackVersion currentVersion = CloudStackVersion.parse("4.9.0");
    assertNotNull(currentVersion);
    final DatabaseUpgradeChecker checker = new DatabaseUpgradeChecker();
    final DbUpgrade[] upgrades = checker.calculateUpgradePath(dbVersion, currentVersion);
    assertNotNull(upgrades);
    assertTrue(upgrades[0] instanceof Upgrade452to460);
    assertTrue(upgrades[1] instanceof Upgrade460to461);
    assertTrue(upgrades[2] instanceof Upgrade461to470);
    assertTrue(upgrades[3] instanceof Upgrade470to471);
    assertTrue(upgrades[4] instanceof Upgrade471to480);
    assertTrue(upgrades[5] instanceof Upgrade480to481);
    assertTrue(Arrays.equals(new String[] { "4.8.1", currentVersion.toString() }, upgrades[6].getUpgradableVersionRange()));
    assertEquals(currentVersion.toString(), upgrades[6].getUpgradedVersion());
}
Also used : Upgrade461to470(com.cloud.upgrade.dao.Upgrade461to470) Upgrade452to460(com.cloud.upgrade.dao.Upgrade452to460) Upgrade480to481(com.cloud.upgrade.dao.Upgrade480to481) CloudStackVersion(org.apache.cloudstack.utils.CloudStackVersion) Upgrade460to461(com.cloud.upgrade.dao.Upgrade460to461) Upgrade471to480(com.cloud.upgrade.dao.Upgrade471to480) Upgrade470to471(com.cloud.upgrade.dao.Upgrade470to471) DbUpgrade(com.cloud.upgrade.dao.DbUpgrade) Test(org.junit.Test)

Example 2 with Upgrade471to480

use of com.cloud.upgrade.dao.Upgrade471to480 in project cloudstack by apache.

the class DatabaseUpgradeCheckerTest method testFindUpgradePath470to481.

@Test
public void testFindUpgradePath470to481() {
    final CloudStackVersion dbVersion = CloudStackVersion.parse("4.7.0");
    assertNotNull(dbVersion);
    final CloudStackVersion currentVersion = CloudStackVersion.parse("4.8.1");
    assertNotNull(currentVersion);
    final DatabaseUpgradeChecker checker = new DatabaseUpgradeChecker();
    final DbUpgrade[] upgrades = checker.calculateUpgradePath(dbVersion, currentVersion);
    assertNotNull(upgrades);
    assertTrue(upgrades[0] instanceof Upgrade470to471);
    assertTrue(upgrades[1] instanceof Upgrade471to480);
    assertTrue(upgrades[2] instanceof Upgrade480to481);
}
Also used : Upgrade480to481(com.cloud.upgrade.dao.Upgrade480to481) CloudStackVersion(org.apache.cloudstack.utils.CloudStackVersion) Upgrade471to480(com.cloud.upgrade.dao.Upgrade471to480) Upgrade470to471(com.cloud.upgrade.dao.Upgrade470to471) DbUpgrade(com.cloud.upgrade.dao.DbUpgrade) Test(org.junit.Test)

Aggregations

DbUpgrade (com.cloud.upgrade.dao.DbUpgrade)2 Upgrade470to471 (com.cloud.upgrade.dao.Upgrade470to471)2 Upgrade471to480 (com.cloud.upgrade.dao.Upgrade471to480)2 Upgrade480to481 (com.cloud.upgrade.dao.Upgrade480to481)2 CloudStackVersion (org.apache.cloudstack.utils.CloudStackVersion)2 Test (org.junit.Test)2 Upgrade452to460 (com.cloud.upgrade.dao.Upgrade452to460)1 Upgrade460to461 (com.cloud.upgrade.dao.Upgrade460to461)1 Upgrade461to470 (com.cloud.upgrade.dao.Upgrade461to470)1