From 1bcc73251df8beedd565ad400633664fba7badf4 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 19 Jan 2017 15:21:40 -0800 Subject: [PATCH] Update handler test to use WithName Fix test panic in handler test. Signed-off-by: Derek McGowan (github: dmcgowan) --- registry/handlers/api_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/registry/handlers/api_test.go b/registry/handlers/api_test.go index 1271846c5..c8e756de6 100644 --- a/registry/handlers/api_test.go +++ b/registry/handlers/api_test.go @@ -892,16 +892,16 @@ func TestGetManifestWithStorageError(t *testing.T) { env1 := newTestEnvWithConfig(t, &config) defer env1.Shutdown() - repo, _ := reference.ParseNamed(repositoryWithManifestNotFound) + repo, _ := reference.WithName(repositoryWithManifestNotFound) testManifestWithStorageError(t, env1, repo, http.StatusNotFound, v2.ErrorCodeManifestUnknown) - repo, _ = reference.ParseNamed(repositoryWithGenericStorageError) + repo, _ = reference.WithName(repositoryWithGenericStorageError) testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown) - repo, _ = reference.ParseNamed(repositoryWithManifestInvalidPath) + repo, _ = reference.WithName(repositoryWithManifestInvalidPath) testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown) - repo, _ = reference.ParseNamed(repositoryWithManifestBadLink) + repo, _ = reference.WithName(repositoryWithManifestBadLink) testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown) }