use of org.eclipse.jkube.kit.build.api.auth.AuthConfig in project jkube by eclipse.
the class DockerRegistryAuthHandlerTest method testDockerLoginNoConfig.
@Test
public void testDockerLoginNoConfig() throws IOException {
executeWithTempHomeDir(dir -> {
AuthConfig config = handler.create(RegistryAuthConfig.Kind.PUSH, "roland", null, s -> s);
assertNull(config);
});
}
use of org.eclipse.jkube.kit.build.api.auth.AuthConfig in project jkube by eclipse.
the class DockerRegistryAuthHandlerTest method testDockerLoginNoAuthConfigFoundWhenCredentialHelperDoesNotMatchDomainOrAuth.
@Test
public void testDockerLoginNoAuthConfigFoundWhenCredentialHelperDoesNotMatchDomainOrAuth() throws IOException {
executeWithTempHomeDir(homeDir -> {
writeDockerConfigJson(createDockerConfig(homeDir), null, singletonMap("registry1", "credHelper1-does-not-exist"));
AuthConfig config = handler.create(RegistryAuthConfig.Kind.PUSH, "roland", "does-not-exist-either:5000", s -> s);
assertNull(config);
});
}
Aggregations