fix return values in registry mock service
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
parent
93af45daab
commit
4d8f45a94d
1 changed files with 3 additions and 0 deletions
|
@ -236,6 +236,7 @@ func handlerGetDeleteTags(w http.ResponseWriter, r *http.Request) {
|
||||||
tags, exists := testRepositories[repositoryName]
|
tags, exists := testRepositories[repositoryName]
|
||||||
if !exists {
|
if !exists {
|
||||||
apiError(w, "Repository not found", 404)
|
apiError(w, "Repository not found", 404)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if r.Method == "DELETE" {
|
if r.Method == "DELETE" {
|
||||||
delete(testRepositories, repositoryName)
|
delete(testRepositories, repositoryName)
|
||||||
|
@ -255,10 +256,12 @@ func handlerGetTag(w http.ResponseWriter, r *http.Request) {
|
||||||
tags, exists := testRepositories[repositoryName]
|
tags, exists := testRepositories[repositoryName]
|
||||||
if !exists {
|
if !exists {
|
||||||
apiError(w, "Repository not found", 404)
|
apiError(w, "Repository not found", 404)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
tag, exists := tags[tagName]
|
tag, exists := tags[tagName]
|
||||||
if !exists {
|
if !exists {
|
||||||
apiError(w, "Tag not found", 404)
|
apiError(w, "Tag not found", 404)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
writeResponse(w, tag, 200)
|
writeResponse(w, tag, 200)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue