forked from TrueCloudLab/distribution
Merge pull request #2161 from dmcgowan/fix-test-panic
Update handler test to use WithName
This commit is contained in:
commit
56b712f454
1 changed files with 4 additions and 4 deletions
|
@ -892,16 +892,16 @@ func TestGetManifestWithStorageError(t *testing.T) {
|
||||||
env1 := newTestEnvWithConfig(t, &config)
|
env1 := newTestEnvWithConfig(t, &config)
|
||||||
defer env1.Shutdown()
|
defer env1.Shutdown()
|
||||||
|
|
||||||
repo, _ := reference.ParseNamed(repositoryWithManifestNotFound)
|
repo, _ := reference.WithName(repositoryWithManifestNotFound)
|
||||||
testManifestWithStorageError(t, env1, repo, http.StatusNotFound, v2.ErrorCodeManifestUnknown)
|
testManifestWithStorageError(t, env1, repo, http.StatusNotFound, v2.ErrorCodeManifestUnknown)
|
||||||
|
|
||||||
repo, _ = reference.ParseNamed(repositoryWithGenericStorageError)
|
repo, _ = reference.WithName(repositoryWithGenericStorageError)
|
||||||
testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown)
|
testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown)
|
||||||
|
|
||||||
repo, _ = reference.ParseNamed(repositoryWithManifestInvalidPath)
|
repo, _ = reference.WithName(repositoryWithManifestInvalidPath)
|
||||||
testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown)
|
testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown)
|
||||||
|
|
||||||
repo, _ = reference.ParseNamed(repositoryWithManifestBadLink)
|
repo, _ = reference.WithName(repositoryWithManifestBadLink)
|
||||||
testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown)
|
testManifestWithStorageError(t, env1, repo, http.StatusInternalServerError, errcode.ErrorCodeUnknown)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue