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

Unified Diff: milo/appengine/job_source/buildbot/console_test.go

Issue 2949783002: [milo] appengine/* -> * (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/appengine/job_source/buildbot/console.go ('k') | milo/appengine/job_source/buildbot/datastore.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/job_source/buildbot/console_test.go
diff --git a/milo/appengine/job_source/buildbot/console_test.go b/milo/appengine/job_source/buildbot/console_test.go
deleted file mode 100644
index 24e6461a9a166ab3ed2b36f2789123a0d4f6ecf7..0000000000000000000000000000000000000000
--- a/milo/appengine/job_source/buildbot/console_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2017 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package buildbot
-
-import (
- "context"
- "strconv"
- "testing"
-
- "github.com/luci/gae/impl/memory"
- "github.com/luci/gae/service/datastore"
- "github.com/luci/luci-go/common/clock/testclock"
- "github.com/luci/luci-go/milo/api/resp"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func TestConsole(t *testing.T) {
- c := memory.UseWithAppID(context.Background(), "dev~luci-milo")
- c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
- fakeTime := float64(123)
- fakeResult := int(0)
-
- // Seed a builder with 8 builds.
- for i := 1; i < 10; i++ {
- datastore.Put(c, &buildbotBuild{
- Master: "fake",
- Buildername: "fake",
- Number: i,
- Internal: false,
- Times: []*float64{&fakeTime, &fakeTime},
- Sourcestamp: &buildbotSourceStamp{
- Revision: strconv.Itoa(i),
- },
- Results: &fakeResult,
- Finished: true,
- })
- }
- putDSMasterJSON(c, &buildbotMaster{
- Name: "fake",
- Builders: map[string]*buildbotBuilder{"fake": {}},
- }, false)
- datastore.GetTestable(c).Consistent(true)
- datastore.GetTestable(c).AutoIndex(true)
- datastore.GetTestable(c).CatchupIndexes()
-
- Convey(`Console tests for buildbot`, t, func() {
- Convey(`Empty request`, func() {
- cb, err := GetConsoleBuilds(c, []resp.BuilderRef{}, []string{})
- So(err, ShouldBeNil)
- So(cb, ShouldResemble, [][]*resp.ConsoleBuild{})
- })
- Convey(`Basic`, func() {
- ref := []resp.BuilderRef{
- {
- Module: "buildbot",
- Name: "fake/fake",
- Category: []string{"np"},
- ShortName: "np",
- },
- }
- cb, err := GetConsoleBuilds(c, ref, []string{"2", "3", "5"})
- So(err, ShouldBeNil)
- So(len(cb), ShouldEqual, 3)
- So(len(cb[0]), ShouldEqual, 1)
- })
- })
-}
« no previous file with comments | « milo/appengine/job_source/buildbot/console.go ('k') | milo/appengine/job_source/buildbot/datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698