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

Unified Diff: milo/appengine/settings/config_test.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 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/settings/config.go ('k') | scheduler/appengine/catalog/catalog.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/appengine/settings/config_test.go
diff --git a/milo/appengine/settings/config_test.go b/milo/appengine/settings/config_test.go
index f886ff717f9a99e457773c898b05b462243376ca..4125131f5b2f1adcaf96a526cc763c5704309002 100644
--- a/milo/appengine/settings/config_test.go
+++ b/milo/appengine/settings/config_test.go
@@ -9,9 +9,10 @@ import (
"testing"
"github.com/luci/gae/impl/memory"
- lucicfg "github.com/luci/luci-go/common/config"
memcfg "github.com/luci/luci-go/common/config/impl/memory"
"github.com/luci/luci-go/common/logging/gologger"
+ "github.com/luci/luci-go/luci_config/server/cfgclient/backend/testconfig"
+
"golang.org/x/net/context"
. "github.com/smartystreets/goconvey/convey"
@@ -23,9 +24,9 @@ func TestConfig(t *testing.T) {
Convey("Test Environment", t, func() {
c := memory.UseWithAppID(context.Background(), "dev~luci-milo")
c = gologger.StdConfig.Use(c)
+ c = testconfig.WithCommonClient(c, memcfg.New(mockedConfigs))
Convey("Send update", func() {
- c = lucicfg.SetImplementation(c, memcfg.New(mockedConfigs))
// Send update here
err := Update(c)
So(err, ShouldBeNil)
@@ -48,7 +49,7 @@ func TestConfig(t *testing.T) {
Convey("Reject duplicate configs.", func() {
mockedConfigs["projects/bar.git"] = memcfg.ConfigSet{"luci-milo.cfg": barCfg}
- c = lucicfg.SetImplementation(c, memcfg.New(mockedConfigs))
+
err := Update(c)
So(strings.HasPrefix(err.Error(), "Duplicate project ID"), ShouldEqual, true)
})
« no previous file with comments | « milo/appengine/settings/config.go ('k') | scheduler/appengine/catalog/catalog.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698