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

Unified Diff: milo/common/config_test.go

Issue 2955223002: Milo: Buildbucket PubSub ingestion outline (Closed)
Patch Set: rebase Created 3 years, 5 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/common/config.go ('k') | milo/common/pubsub.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/common/config_test.go
diff --git a/milo/common/config_test.go b/milo/common/config_test.go
index 6d20bd173d9567220a6545400d96614776e462f8..4762360317cfec011e6ec042b91cf998afb77ce8 100644
--- a/milo/common/config_test.go
+++ b/milo/common/config_test.go
@@ -29,7 +29,7 @@ func TestConfig(t *testing.T) {
Convey("Tests about global configs", func() {
Convey("Read a config before anything is set", func() {
c = testconfig.WithCommonClient(c, memcfg.New(mockedConfigs))
- err := UpdateServiceConfig(c)
+ _, err := UpdateServiceConfig(c)
So(err, ShouldResemble, errors.New("could not load settings.cfg from luci-config: no such config"))
settings := GetSettings(c)
So(settings.Buildbot.InternalReader, ShouldEqual, "")
@@ -39,16 +39,17 @@ func TestConfig(t *testing.T) {
"settings.cfg": settingsCfg,
}
c = testconfig.WithCommonClient(c, memcfg.New(mockedConfigs))
- err := UpdateServiceConfig(c)
+ rSettings, err := UpdateServiceConfig(c)
So(err, ShouldBeNil)
settings := GetSettings(c)
+ So(rSettings, ShouldResemble, settings)
So(settings.Buildbot.InternalReader, ShouldEqual, "googlers")
})
})
Convey("Send update", func() {
c = testconfig.WithCommonClient(c, memcfg.New(mockedConfigs))
- err := UpdateServiceConfig(c)
+ _, err := UpdateServiceConfig(c)
So(err, ShouldBeNil)
// Send update here
err = UpdateProjectConfigs(c)
@@ -72,7 +73,7 @@ func TestConfig(t *testing.T) {
Convey("Reject duplicate configs.", func() {
c = testconfig.WithCommonClient(c, memcfg.New(mockedConfigs))
- err := UpdateServiceConfig(c)
+ _, err := UpdateServiceConfig(c)
So(err, ShouldBeNil)
mockedConfigs["projects/bar.git"] = memcfg.ConfigSet{"luci-milo.cfg": barCfg}
« no previous file with comments | « milo/common/config.go ('k') | milo/common/pubsub.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698