Search in sources :

Example 1 with DistroXGenerateImageCatalogV1Response

use of com.sequenceiq.distrox.api.v1.distrox.model.DistroXGenerateImageCatalogV1Response in project cloudbreak by hortonworks.

the class DistroXV1ControllerTest method testGenerateImageCatalog.

@Test
void testGenerateImageCatalog() {
    CloudbreakImageCatalogV3 imageCatalog = Mockito.mock(CloudbreakImageCatalogV3.class);
    when(workspaceService.getForCurrentUser()).thenReturn(workspace);
    when(workspace.getId()).thenReturn(WORKSPACE_ID);
    when(stackOperations.generateImageCatalog(nameOrCrnArgumentCaptor.capture(), Mockito.eq(WORKSPACE_ID))).thenReturn(imageCatalog);
    DistroXGenerateImageCatalogV1Response actual = distroXV1Controller.generateImageCatalog(NAME);
    assertEquals(NAME, nameOrCrnArgumentCaptor.getValue().getName());
    assertEquals(imageCatalog, actual.getImageCatalog());
}
Also used : CloudbreakImageCatalogV3(com.sequenceiq.cloudbreak.cloud.model.catalog.CloudbreakImageCatalogV3) DistroXGenerateImageCatalogV1Response(com.sequenceiq.distrox.api.v1.distrox.model.DistroXGenerateImageCatalogV1Response) Test(org.junit.jupiter.api.Test)

Aggregations

CloudbreakImageCatalogV3 (com.sequenceiq.cloudbreak.cloud.model.catalog.CloudbreakImageCatalogV3)1 DistroXGenerateImageCatalogV1Response (com.sequenceiq.distrox.api.v1.distrox.model.DistroXGenerateImageCatalogV1Response)1 Test (org.junit.jupiter.api.Test)1