use of com.cloud.upgrade.dao.Upgrade490to4910 in project cloudstack by apache.
the class DatabaseUpgradeCheckerTest method testCalculateUpgradePath490to4910.
@Test
public void testCalculateUpgradePath490to4910() {
final CloudStackVersion dbVersion = CloudStackVersion.parse("4.9.0");
assertNotNull(dbVersion);
final CloudStackVersion currentVersion = CloudStackVersion.parse("4.9.1.0");
assertNotNull(currentVersion);
final DatabaseUpgradeChecker checker = new DatabaseUpgradeChecker();
final DbUpgrade[] upgrades = checker.calculateUpgradePath(dbVersion, currentVersion);
assertNotNull(upgrades);
assertTrue(upgrades.length >= 1);
assertTrue(upgrades[0] instanceof Upgrade490to4910);
assertTrue(Arrays.equals(new String[] { "4.9.0", currentVersion.toString() }, upgrades[0].getUpgradableVersionRange()));
assertEquals(currentVersion.toString(), upgrades[0].getUpgradedVersion());
}
Aggregations