Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: milo/appengine/buildbot/html.go

Issue 2856273004: Milo: Increase test coverage for appengine/buildbot (Closed)
Patch Set: Imports, headers Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: milo/appengine/buildbot/html.go
diff --git a/milo/appengine/buildbot/html.go b/milo/appengine/buildbot/html.go
index 3b1d2b84f08b7ae8d30bc9fedef0563269a0725d..557bca8294836f559192aa0ea82a162d133918d3 100644
--- a/milo/appengine/buildbot/html.go
+++ b/milo/appengine/buildbot/html.go
@@ -38,7 +38,7 @@ func BuildHandler(c *router.Context) {
return
}
- result, err := build(c.Context, master, builder, num)
+ result, err := Build(c.Context, master, builder, num)
if err != nil {
var code int
switch err {
@@ -84,6 +84,14 @@ func BuilderHandler(c *router.Context) {
result, err := builderImpl(c.Context, master, builder, limit, cursor)
if err != nil {
nodir 2017/05/26 18:33:05 we have 4 cases here essentially. I think using sw
Ryan Tseng 2017/05/26 22:49:22 I was reluctlant to do this because I wouldn't hav
+ if _, ok := err.(errBuilderNotFound); ok {
+ common.ErrorPage(c, http.StatusNotFound, err.Error())
+ return
+ }
+ if err == errNotAuth {
+ common.ErrorPage(c, http.StatusUnauthorized, err.Error())
+ return
+ }
common.ErrorPage(c, http.StatusInternalServerError, err.Error())
return
}

Powered by Google App Engine
This is Rietveld 408576698