From 4d8f45a94d89c23d4b98d47318353e705494b534 Mon Sep 17 00:00:00 2001 From: Erik Hollensbe Date: Mon, 25 Aug 2014 10:29:38 -0700 Subject: [PATCH] fix return values in registry mock service Docker-DCO-1.1-Signed-off-by: Erik Hollensbe (github: erikh) --- docs/registry_mock_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/registry_mock_test.go b/docs/registry_mock_test.go index 2b4cd9de..8851dcbe 100644 --- a/docs/registry_mock_test.go +++ b/docs/registry_mock_test.go @@ -236,6 +236,7 @@ func handlerGetDeleteTags(w http.ResponseWriter, r *http.Request) { tags, exists := testRepositories[repositoryName] if !exists { apiError(w, "Repository not found", 404) + return } if r.Method == "DELETE" { delete(testRepositories, repositoryName) @@ -255,10 +256,12 @@ func handlerGetTag(w http.ResponseWriter, r *http.Request) { tags, exists := testRepositories[repositoryName] if !exists { apiError(w, "Repository not found", 404) + return } tag, exists := tags[tagName] if !exists { apiError(w, "Tag not found", 404) + return } writeResponse(w, tag, 200) }