Update handler test to use WithName

Fix test panic in handler test.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2017-01-19 15:21:40 -08:00
parent 96b02e885a
commit 1bcc73251d
No known key found for this signature in database
GPG key ID: F58C5D0A4405ACDB

View file

@ -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)
}