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

Unified Diff: milo/appengine/buildbucket/builder_test.go

Issue 2765383002: Milo: Move instance configuration to luci-config (Closed)
Patch Set: Review Created 3 years, 9 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/buildbucket/builder.go ('k') | milo/appengine/buildbucket/html.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/buildbucket/builder_test.go
diff --git a/milo/appengine/buildbucket/builder_test.go b/milo/appengine/buildbucket/builder_test.go
index 411541a51da144d60f7082bb06faea25477ab46a..e89f28a61c9aef0bdb9178b3eacb6f852381c162 100644
--- a/milo/appengine/buildbucket/builder_test.go
+++ b/milo/appengine/buildbucket/builder_test.go
@@ -14,7 +14,10 @@ import (
"testing"
"time"
+ "github.com/luci/gae/impl/memory"
"github.com/luci/luci-go/common/clock/testclock"
+ memcfg "github.com/luci/luci-go/common/config/impl/memory"
+ "github.com/luci/luci-go/luci_config/server/cfgclient/backend/testconfig"
"golang.org/x/net/context"
. "github.com/smartystreets/goconvey/convey"
@@ -31,8 +34,9 @@ func TestBuilder(t *testing.T) {
}
Convey("Builder", t, func() {
- c := context.Background()
+ c := memory.UseWithAppID(context.Background(), "dev~luci-milo")
c, _ = testclock.UseTime(c, time.Date(2016, time.March, 14, 11, 0, 0, 0, time.UTC))
+ c = testconfig.WithCommonClient(c, memcfg.New(bktConfigFull))
for _, tc := range testCases {
tc := tc
@@ -43,7 +47,6 @@ func TestBuilder(t *testing.T) {
actual, err := builderImpl(c,
builderQuery{
- Server: "debug",
Bucket: tc.bucket,
Builder: tc.builder,
Limit: 0,
@@ -64,3 +67,15 @@ func TestBuilder(t *testing.T) {
}
})
}
+
+var bktConfig = `
+buildbucket: {
+ host: "debug"
+}
+`
+
+var bktConfigFull = map[string]memcfg.ConfigSet{
+ "services/luci-milo": {
+ "settings.cfg": bktConfig,
+ },
+}
« no previous file with comments | « milo/appengine/buildbucket/builder.go ('k') | milo/appengine/buildbucket/html.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698