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

Unified Diff: milo/common/config_test.go

Issue 2980153002: Milo: Fix project importer so it doesn't error out on a bad config (Closed)
Patch Set: Review 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') | no next file » | 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 9ddf4bd73fef3301c09a1af0d552cf3446be43ee..ee1863b589a0d89df935ce48a76bc13d78e6ba27 100644
--- a/milo/common/config_test.go
+++ b/milo/common/config_test.go
@@ -16,7 +16,6 @@ package common
import (
"errors"
- "strings"
"testing"
"github.com/luci/gae/impl/memory"
@@ -78,16 +77,6 @@ func TestConfig(t *testing.T) {
So(cs.RepoURL, ShouldEqual, "https://chromium.googlesource.com/foo/bar")
})
})
-
- Convey("Reject duplicate configs.", func() {
- c = testconfig.WithCommonClient(c, memcfg.New(mockedConfigs))
- _, err := UpdateServiceConfig(c)
- So(err, ShouldBeNil)
- mockedConfigs["projects/bar.git"] = memcfg.ConfigSet{"luci-milo.cfg": barCfg}
-
- err = UpdateProjectConfigs(c)
- So(strings.HasPrefix(err.Error(), "Duplicate project ID"), ShouldEqual, true)
- })
})
}
@@ -110,10 +99,6 @@ Consoles: {
}
`
-var barCfg = `
-ID: "foo"
-`
-
var settingsCfg = `
buildbot: {
internal_reader: "googlers"
@@ -121,7 +106,7 @@ buildbot: {
`
var mockedConfigs = map[string]memcfg.ConfigSet{
- "projects/foo.git": {
+ "projects/foo": {
"luci-milo.cfg": fooCfg,
},
}
« no previous file with comments | « milo/common/config.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698