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

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

Issue 2695383002: milo: Enable Swarming LogDog log loading. (Closed)
Patch Set: Comments, fix links. Created 3 years, 10 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/swarming/html.go
diff --git a/milo/appengine/swarming/html.go b/milo/appengine/swarming/html.go
index 404a747ba815d941d779142d90ca6901df01a757..bafb0aa8e713ce49af0a6bf5bd15b6e1f778ca32 100644
--- a/milo/appengine/swarming/html.go
+++ b/milo/appengine/swarming/html.go
@@ -53,7 +53,11 @@ func getSwarmingService(c context.Context, host string) (swarmingService, error)
type Log struct{}
// Build is for deciphering recipe builds from swarming based off of logs.
-type Build struct{}
+type Build struct {
+ // bl is the buildLoader to use. A zero value is suitable for production, but
+ // this can be overridden for testing.
+ bl buildLoader
+}
// GetTemplateName for Log returns the template name for log pages.
func (l Log) GetTemplateName(t settings.Theme) string {
@@ -115,7 +119,7 @@ func (b Build) Render(c context.Context, r *http.Request, p httprouter.Params) (
return nil, convertErr(err)
}
- result, err := swarmingBuildImpl(c, sf, r.URL.String(), id)
+ result, err := b.bl.swarmingBuildImpl(c, sf, r.URL.String(), id)
if err != nil {
return nil, convertErr(err)
}
« no previous file with comments | « milo/appengine/swarming/expectations/build-running-logdog.json ('k') | milo/appengine/swarming/html_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698