use of io.fabric8.maven.docker.util.JibServiceUtil in project docker-maven-plugin by fabric8io.
the class JibBuildServiceTest method testPushWithConfiguration.
@Test
public void testPushWithConfiguration(@Mocked JibServiceUtil jibServiceUtil) throws Exception {
// Given
File projectBaseDir = Files.createTempDirectory("test").toFile();
setupServiceHubExpectations(projectBaseDir);
final ImageConfiguration imageConfiguration = getImageConfiguration();
final RegistryService.RegistryConfig registryConfig = new RegistryService.RegistryConfig.Builder().authConfigFactory(authConfigFactory).build();
mockAuthConfigFactory(true, registryConfig);
// When
new JibBuildService(serviceHub, params, logger).push(Collections.singletonList(imageConfiguration), 1, registryConfig, false);
// Then
// @formatter:off
new Verifications() {
{
JibServiceUtil.jibPush(imageConfiguration, Credential.from("testuserpush", "testpass"), (File) any, logger);
times = 1;
}
};
// @formatter:on
}
Aggregations