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

Side by Side Diff: milo/appengine/buildbot/master_test.go

Issue 2856273004: Milo: Increase test coverage for appengine/buildbot (Closed)
Patch Set: GoFmt 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 unified diff | Download patch
OLDNEW
(Empty)
1 package buildbot
2
3 import (
4 "context"
5 "testing"
6
7 "github.com/luci/gae/impl/memory"
8 "github.com/luci/gae/service/datastore"
9 "github.com/luci/luci-go/common/clock/testclock"
10 . "github.com/smartystreets/goconvey/convey"
11 )
12
13 func TestMaster(t *testing.T) {
14 c := memory.UseWithAppID(context.Background(), "dev~luci-milo")
15 c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
16 datastore.GetTestable(c).Consistent(true)
17 datastore.GetTestable(c).AutoIndex(true)
18 datastore.GetTestable(c).CatchupIndexes()
19
20 Convey(`Tests for master`, t, func() {
21 So(putDSMasterJSON(c, &buildbotMaster{
22 Name: "fake",
23 Builders: map[string]*buildbotBuilder{"fake": {}},
24 }, false), ShouldBeNil)
25 So(putDSMasterJSON(c, &buildbotMaster{
26 Name: "fake internal",
27 Builders: map[string]*buildbotBuilder{"fake": {}},
28 }, true), ShouldBeNil)
29
30 Convey(`GetAllBuilders()`, func() {
31 cs, err := GetAllBuilders(c)
32 So(err, ShouldBeNil)
33 So(len(cs.BuilderGroups), ShouldEqual, 1)
34 })
35 })
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698