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

Side by Side Diff: milo/appengine/frontend/buildbot_data.go

Issue 2944983003: [milo] {buildbucket,buildbot,swarming,logdog} -> backends/*. (Closed)
Patch Set: fix the tests Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « milo/appengine/console/console.go ('k') | milo/appengine/frontend/frontpage.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package frontend 5 package frontend
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 9
10 "github.com/luci/gae/impl/memory" 10 "github.com/luci/gae/impl/memory"
11 "github.com/luci/luci-go/common/clock/testclock" 11 "github.com/luci/luci-go/common/clock/testclock"
12 "github.com/luci/luci-go/milo/api/resp" 12 "github.com/luci/luci-go/milo/api/resp"
13 "github.com/luci/luci-go/milo/appengine/buildbot"
14 "github.com/luci/luci-go/milo/appengine/common" 13 "github.com/luci/luci-go/milo/appengine/common"
14 "github.com/luci/luci-go/milo/appengine/job_source/buildbot"
15 "github.com/luci/luci-go/server/templates" 15 "github.com/luci/luci-go/server/templates"
16 "golang.org/x/net/context" 16 "golang.org/x/net/context"
17 ) 17 )
18 18
19 // buildbotBuildTestData returns sample test data for build pages. 19 // buildbotBuildTestData returns sample test data for build pages.
20 func buildbotBuildTestData() []common.TestBundle { 20 func buildbotBuildTestData() []common.TestBundle {
21 c := memory.Use(context.Background()) 21 c := memory.Use(context.Background())
22 c, _ = testclock.UseTime(c, testclock.TestTimeUTC) 22 c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
23 bundles := []common.TestBundle{} 23 bundles := []common.TestBundle{}
24 for _, tc := range buildbot.TestCases { 24 for _, tc := range buildbot.TestCases {
25 » » build, err := buildbot.Build(c, "debug", tc.Builder, tc.Build) 25 » » build, err := buildbot.DebugBuild(c, "../job_source/buildbot", t c.Builder, tc.Build)
26 if err != nil { 26 if err != nil {
27 panic(fmt.Errorf( 27 panic(fmt.Errorf(
28 "Encountered error while building debug/%s/%s.\n %s", 28 "Encountered error while building debug/%s/%s.\n %s",
29 tc.Builder, tc.Build, err)) 29 tc.Builder, tc.Build, err))
30 } 30 }
31 bundles = append(bundles, common.TestBundle{ 31 bundles = append(bundles, common.TestBundle{
32 Description: fmt.Sprintf("Debug page: %s/%d", tc.Builder , tc.Build), 32 Description: fmt.Sprintf("Debug page: %s/%d", tc.Builder , tc.Build),
33 Data: templates.Args{ 33 Data: templates.Args{
34 "Build": build, 34 "Build": build,
35 }, 35 },
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 {Link: l, Revision: "deadbeef"}, 68 {Link: l, Revision: "deadbeef"},
69 }, 69 },
70 FinishedBuilds: []*resp.BuildSummary{ 70 FinishedBuilds: []*resp.BuildSummary{
71 {Link: l, Revision: "deadbeef"}, 71 {Link: l, Revision: "deadbeef"},
72 }, 72 },
73 }, 73 },
74 }, 74 },
75 }, 75 },
76 } 76 }
77 } 77 }
OLDNEW
« no previous file with comments | « milo/appengine/console/console.go ('k') | milo/appengine/frontend/frontpage.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698