From c2735aaeb7fd86fffc8a2414c7d4d94294420603 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Wed, 15 Feb 2017 17:25:25 -0700 Subject: [PATCH] test/cmd: teach lock verify to respond with 5xx based on reponame --- test/cmd/lfstest-gitserver.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cmd/lfstest-gitserver.go b/test/cmd/lfstest-gitserver.go index 910d204c..2424bfd4 100644 --- a/test/cmd/lfstest-gitserver.go +++ b/test/cmd/lfstest-gitserver.go @@ -968,6 +968,15 @@ func locksHandler(w http.ResponseWriter, r *http.Request, repo string) { } if strings.HasSuffix(r.URL.Path, "/locks/verify") { + if strings.HasSuffix(repo, "verify-5xx") { + w.WriteHeader(500) + return + } + if strings.HasSuffix(repo, "verify-501") { + w.WriteHeader(501) + return + } + switch repo { case "pre_push_locks_verify_404": w.WriteHeader(http.StatusNotFound)