use of com.sequenceiq.cloudbreak.cloud.model.catalog.CloudbreakImageCatalogV3 in project cloudbreak by hortonworks.
the class CloudbreakVersionListProviderTest method testGetVersionsWithNullCatalogVersions.
@Test
public void testGetVersionsWithNullCatalogVersions() {
CloudbreakImageCatalogV3 catalog = new CloudbreakImageCatalogV3(null, null);
List<CloudbreakVersion> versions = underTest.getVersions(catalog);
assertNotNull(versions);
assertTrue(versions.isEmpty());
}
use of com.sequenceiq.cloudbreak.cloud.model.catalog.CloudbreakImageCatalogV3 in project cloudbreak by hortonworks.
the class AdvertisedImageProviderTest method shouldNotIncludeBaseImagesWhenBaseImagesAreDisabled.
@Test
public void shouldNotIncludeBaseImagesWhenBaseImagesAreDisabled() {
CloudbreakImageCatalogV3 imageCatalog = anImageCatalogV3();
StatedImages actual = victim.getImages(anImageCatalogV3(), createImageFilter(false));
assertFalse(imageCatalog.getImages().getBaseImages().isEmpty());
assertTrue(actual.getImages().getBaseImages().isEmpty());
}
use of com.sequenceiq.cloudbreak.cloud.model.catalog.CloudbreakImageCatalogV3 in project cloudbreak by hortonworks.
the class RawImageProviderTest method testGetImagesShouldReturnOnlyTheAwsImagesFromTheImageCatalog.
@Test
void testGetImagesShouldReturnOnlyTheAwsImagesFromTheImageCatalog() {
ImageFilter imageFilter = createImageFilter();
CloudbreakImageCatalogV3 imageCatalogV3 = createImageCatalog();
StatedImages actual = underTest.getImages(imageCatalogV3, imageFilter);
assertEquals(IMAGE_CATALOG_NAME, actual.getImageCatalogName());
assertEquals(IMAGE_CATALOG_URL, actual.getImageCatalogUrl());
Images images = actual.getImages();
assertTrue(images.getBaseImages().stream().anyMatch(image -> BASE_IMAGE_AWS.equals(image.getUuid())));
assertTrue(images.getBaseImages().stream().noneMatch(image -> BASE_IMAGE_AZURE.equals(image.getUuid())));
assertTrue(images.getCdhImages().stream().anyMatch(image -> CDH_IMAGE_AWS.equals(image.getUuid())));
assertTrue(images.getCdhImages().stream().noneMatch(image -> CDH_IMAGE_AZURE.equals(image.getUuid())));
assertTrue(images.getFreeIpaImages().stream().anyMatch(image -> FREEIPA_IMAGE_AWS.equals(image.getUuid())));
assertTrue(images.getFreeIpaImages().stream().noneMatch(image -> FREEIPA_IMAGE_AZURE.equals(image.getUuid())));
}
Aggregations