diff --git a/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_auth_test.go b/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_auth_test.go index 1f328911e2..efc7b6d0b5 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_auth_test.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_manager/docker_auth_test.go @@ -27,6 +27,13 @@ func writeStaticConfig(t *testing.T, configContent string) string { return tmpDir } +func TestGetNoAuth(t *testing.T) { + os.Setenv(ENV_DOCKER_CONFIG, "/does/not/exist") + authConfig, err := GetAuthFromDockerConfig("my-repo/my-image:latest") + assert.NoError(t, err) + assert.Nil(t, authConfig, "Auth config should be nil") +} + func TestGetAuthConfigForRepoPlain(t *testing.T) { expectedUser := "user" expectedPassword := "password"