use of com.openshift.restclient.model.IImageStream in project jbosstools-openshift by jbosstools.
the class DeployImageJobTest method givenTheImageStreamExistsTo.
private void givenTheImageStreamExistsTo(String name) {
IImageStream is = createResource(IImageStream.class, ResourceKind.IMAGE_STREAM);
when(connection.getResource(ResourceKind.IMAGE_STREAM, project.getName(), name)).thenReturn(is);
}
use of com.openshift.restclient.model.IImageStream in project jbosstools-openshift by jbosstools.
the class DeployImageJobTest method testStubImageStreamWhereOneAlreadyExistsInTheCommonProject.
@Test
public void testStubImageStreamWhereOneAlreadyExistsInTheCommonProject() {
givenAnImageStreamTo(ICommonAttributes.COMMON_NAMESPACE, DOCKER_TAG);
IImageStream is = whenStubbingTheImageStream(DOCKER_TAG_DIFF_REPO);
assertNotNull("Exp. an IS to be returned", is);
assertEquals(IMAGE_STREAM_NAME, is.getName());
assertEquals(ICommonAttributes.COMMON_NAMESPACE, is.getNamespaceName());
assertEquals(DOCKER_TAG, is.getDockerImageRepository());
}
use of com.openshift.restclient.model.IImageStream in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromImageJobTest method testStubImageStream.
@Test
public void testStubImageStream() {
IImageStream stub = mock(IImageStream.class);
when(factory.stub(anyString(), anyString(), anyString())).thenReturn(stub);
IImageStream is = job.stubImageStream(factory, APP_NAME, project, null);
assertEquals(stub, is);
verify(factory).stub(ResourceKind.IMAGE_STREAM, APP_NAME, project.getName());
}
Aggregations