use of com.sequenceiq.cloudbreak.service.upgrade.image.ImageFilterParams in project cloudbreak by hortonworks.
the class UpgradePermissionProviderTest method testPermitStackUpgradeShouldReturnfalseWhenTheCandidateCdhVersionIsNotSupported.
@Test
public void testPermitStackUpgradeShouldReturnfalseWhenTheCandidateCdhVersionIsNotSupported() {
String currentVersion = "7.2.1";
String targetVersion = "7.2.10";
Image currentImage = createImage(currentVersion, "2002");
Image candidateImage = createImage(targetVersion, "2010");
ImageFilterParams imageFilterParams = new ImageFilterParams(currentImage, true, Map.of(), DATALAKE_STACK_TYPE, null, STACK_ID, new InternalUpgradeSettings(false, true, true), imageCatalogPlatform(CLOUD_PLATFORM));
when(supportedRuntimes.isSupported("7.2.10")).thenReturn(false);
boolean actual = underTest.permitStackUpgrade(imageFilterParams, candidateImage);
assertFalse(actual);
verify(supportedRuntimes).isSupported("7.2.10");
verifyNoInteractions(componentBuildNumberComparator, componentVersionComparator, upgradeMatrixService);
}
Aggregations