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

Unified Diff: common/data/text/templateproto/loader_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 | « common/data/text/templateproto/loader.go ('k') | dm/api/template/loader.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/data/text/templateproto/loader_test.go
diff --git a/common/data/text/templateproto/loader_test.go b/common/data/text/templateproto/loader_test.go
index 100b8569f2e422a32bd9d82ddc97d9e3025a955a..2a54ef94ca2419441e2263d49b64d91783f0c039 100644
--- a/common/data/text/templateproto/loader_test.go
+++ b/common/data/text/templateproto/loader_test.go
@@ -7,10 +7,6 @@ package templateproto
import (
"testing"
- "golang.org/x/net/context"
-
- "github.com/luci/luci-go/common/config"
- "github.com/luci/luci-go/common/config/impl/memory"
. "github.com/luci/luci-go/common/testing/assertions"
. "github.com/smartystreets/goconvey/convey"
)
@@ -19,7 +15,7 @@ func TestLoadFromConfig(t *testing.T) {
t.Parallel()
Convey("LoadFile", t, func() {
- c := config.SetImplementation(context.Background(), memory.New(map[string]memory.ConfigSet{"projects/foo": {"templates/bar.cfg": `
+ templateContent := `
template: <
key: "hardcode"
value: <
@@ -77,12 +73,11 @@ func TestLoadFromConfig(t *testing.T) {
>
>
>
- `}}))
+ `
Convey("basic load", func() {
- file, vers, err := LoadFile(c, "projects/foo", "templates/bar.cfg")
+ file, err := LoadFile(templateContent)
So(err, ShouldBeNil)
- So(vers, ShouldEqual, "v1:989dbfaacc4565bcf1491388c912e7afc378d19d")
So(file, ShouldResemble, &File{Template: map[string]*File_Template{
"hardcode": {
Doc: "it's hard-coded",
« no previous file with comments | « common/data/text/templateproto/loader.go ('k') | dm/api/template/loader.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698