Search in sources :

Example 6 with ImageNameResolver

use of com.blackducksoftware.integration.hub.imageinspector.name.ImageNameResolver in project hub-docker-inspector by blackducksoftware.

the class imageNameResolverTest method testEndsWithColon.

@Test
public void testEndsWithColon() {
    final ImageNameResolver resolver = new ImageNameResolver("alpine:");
    assertTrue(resolver.getNewImageRepo().isPresent());
    assertTrue(resolver.getNewImageTag().isPresent());
    assertEquals("alpine", resolver.getNewImageRepo().get());
    assertEquals("latest", resolver.getNewImageTag().get());
}
Also used : ImageNameResolver(com.blackducksoftware.integration.hub.imageinspector.name.ImageNameResolver) Test(org.junit.Test)

Example 7 with ImageNameResolver

use of com.blackducksoftware.integration.hub.imageinspector.name.ImageNameResolver in project hub-docker-inspector by blackducksoftware.

the class imageNameResolverTest method testBothColonInRepoSpecifier.

@Test
public void testBothColonInRepoSpecifier() {
    final ImageNameResolver resolver = new ImageNameResolver("artifactoryserver:5000/alpine:1.0");
    assertTrue(resolver.getNewImageRepo().isPresent());
    assertTrue(resolver.getNewImageTag().isPresent());
    assertEquals("artifactoryserver:5000/alpine", resolver.getNewImageRepo().get());
    assertEquals("1.0", resolver.getNewImageTag().get());
}
Also used : ImageNameResolver(com.blackducksoftware.integration.hub.imageinspector.name.ImageNameResolver) Test(org.junit.Test)

Aggregations

ImageNameResolver (com.blackducksoftware.integration.hub.imageinspector.name.ImageNameResolver)7 Test (org.junit.Test)5 HubIntegrationException (com.blackducksoftware.integration.hub.exception.HubIntegrationException)1 DockerClient (com.github.dockerjava.api.DockerClient)1 InspectImageCmd (com.github.dockerjava.api.command.InspectImageCmd)1 InspectImageResponse (com.github.dockerjava.api.command.InspectImageResponse)1 File (java.io.File)1