use of com.google.cloud.tools.jib.api.InsecureRegistryException in project jib by GoogleContainerTools.
the class JibBuildRunnerTest method testBuildImage_insecureRegistryException.
@Test
public void testBuildImage_insecureRegistryException() throws InterruptedException, IOException, CacheDirectoryCreationException, RegistryException, ExecutionException {
InsecureRegistryException mockInsecureRegistryException = Mockito.mock(InsecureRegistryException.class);
Mockito.doThrow(mockInsecureRegistryException).when(mockJibContainerBuilder).containerize(mockContainerizer);
try {
testJibBuildRunner.runBuild();
Assert.fail();
} catch (BuildStepsExecutionException ex) {
Assert.assertEquals(TEST_HELPFUL_SUGGESTIONS.forInsecureRegistry(), ex.getMessage());
}
}
Aggregations