| Index: milo/appengine/frontend/buildbot_data.go
|
| diff --git a/milo/appengine/buildbot/html_data.go b/milo/appengine/frontend/buildbot_data.go
|
| similarity index 73%
|
| copy from milo/appengine/buildbot/html_data.go
|
| copy to milo/appengine/frontend/buildbot_data.go
|
| index 6640bc81a2447c814aa912a87bdac7fc27476c63..0006fcf2ea7a165449928e3e6f8ec3ba58a4c1ea 100644
|
| --- a/milo/appengine/buildbot/html_data.go
|
| +++ b/milo/appengine/frontend/buildbot_data.go
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed under the Apache License, Version 2.0
|
| // that can be found in the LICENSE file.
|
|
|
| -package buildbot
|
| +package frontend
|
|
|
| import (
|
| "fmt"
|
| @@ -10,35 +10,26 @@ import (
|
| "github.com/luci/gae/impl/memory"
|
| "github.com/luci/luci-go/common/clock/testclock"
|
| "github.com/luci/luci-go/milo/api/resp"
|
| + "github.com/luci/luci-go/milo/appengine/buildbot"
|
| "github.com/luci/luci-go/milo/appengine/common"
|
| "github.com/luci/luci-go/server/templates"
|
| "golang.org/x/net/context"
|
| )
|
|
|
| -// We put this here because _test.go files are sometimes not built.
|
| -var testCases = []struct {
|
| - builder string
|
| - build int
|
| -}{
|
| - {"CrWinGoma", 30608},
|
| - {"win_chromium_rel_ng", 246309},
|
| - {"newline", 1234},
|
| -}
|
| -
|
| -// BuildTestData returns sample test data for build pages.
|
| -func BuildTestData() []common.TestBundle {
|
| +// buildbotBuildTestData returns sample test data for build pages.
|
| +func buildbotBuildTestData() []common.TestBundle {
|
| c := memory.Use(context.Background())
|
| c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
|
| bundles := []common.TestBundle{}
|
| - for _, tc := range testCases {
|
| - build, err := build(c, "debug", tc.builder, tc.build)
|
| + for _, tc := range buildbot.TestCases {
|
| + build, err := buildbot.Build(c, "debug", tc.Builder, tc.Build)
|
| if err != nil {
|
| panic(fmt.Errorf(
|
| "Encountered error while building debug/%s/%s.\n%s",
|
| - tc.builder, tc.build, err))
|
| + tc.Builder, tc.Build, err))
|
| }
|
| bundles = append(bundles, common.TestBundle{
|
| - Description: fmt.Sprintf("Debug page: %s/%d", tc.builder, tc.build),
|
| + Description: fmt.Sprintf("Debug page: %s/%d", tc.Builder, tc.Build),
|
| Data: templates.Args{
|
| "Build": build,
|
| },
|
| @@ -47,8 +38,8 @@ func BuildTestData() []common.TestBundle {
|
| return bundles
|
| }
|
|
|
| -// BiulderTestData returns sample test data for builder pages.
|
| -func BuilderTestData() []common.TestBundle {
|
| +// buildbotBuilderTestData returns sample test data for builder pages.
|
| +func buildbotBuilderTestData() []common.TestBundle {
|
| return []common.TestBundle{
|
| {
|
| Description: "Basic Test no builds",
|
|
|