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

Side by Side Diff: milo/appengine/job_source/buildbot/master_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 package buildbot
6
7 import (
8 "context"
9 "testing"
10
11 "github.com/luci/gae/impl/memory"
12 "github.com/luci/gae/service/datastore"
13 "github.com/luci/luci-go/common/clock/testclock"
14
15 . "github.com/smartystreets/goconvey/convey"
16 )
17
18 func TestMaster(t *testing.T) {
19 c := memory.UseWithAppID(context.Background(), "dev~luci-milo")
20 c, _ = testclock.UseTime(c, testclock.TestTimeUTC)
21 datastore.GetTestable(c).Consistent(true)
22 datastore.GetTestable(c).AutoIndex(true)
23 datastore.GetTestable(c).CatchupIndexes()
24
25 Convey(`Tests for master`, t, func() {
26 So(putDSMasterJSON(c, &buildbotMaster{
27 Name: "fake",
28 Builders: map[string]*buildbotBuilder{"fake": {}},
29 }, false), ShouldBeNil)
30 So(putDSMasterJSON(c, &buildbotMaster{
31 Name: "fake internal",
32 Builders: map[string]*buildbotBuilder{"fake": {}},
33 }, true), ShouldBeNil)
34
35 Convey(`GetAllBuilders()`, func() {
36 cs, err := GetAllBuilders(c)
37 So(err, ShouldBeNil)
38 So(len(cs.BuilderGroups), ShouldEqual, 1)
39 })
40 })
41 }
OLDNEW
« no previous file with comments | « milo/appengine/job_source/buildbot/master.go ('k') | milo/appengine/job_source/buildbot/pubsub.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698