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

Unified Diff: service/datastore/properties_test.go

Issue 1516173002: Fix error message from KeyForObj when passing an invalid struct. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Fix GetMetaDefault silliness Created 5 years 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
Index: service/datastore/properties_test.go
diff --git a/service/datastore/properties_test.go b/service/datastore/properties_test.go
index f814d435f39119ae4d989e5532cfc85ff41aa23b..4f3d94f5f25e8e3810a5281b0548d833ca26a237 100644
--- a/service/datastore/properties_test.go
+++ b/service/datastore/properties_test.go
@@ -152,8 +152,14 @@ func TestDSPropertyMapImpl(t *testing.T) {
v, err := pm.GetMeta("foo")
So(err, ShouldBeNil)
So(v, ShouldEqual, 100)
- So(pm.GetMetaDefault("foo", 100), ShouldEqual, 100)
- So(pm.GetMetaDefault("bar", 100), ShouldEqual, 100)
+
+ v, err = GetMetaDefault(pm, "foo", 100)
+ So(err, ShouldBeNil)
+ So(v, ShouldEqual, 100)
+
+ v, err = GetMetaDefault(pm, "bar", 100)
+ So(err, ShouldBeNil)
+ So(v, ShouldEqual, 100)
npm, err := pm.Save(false)
So(err, ShouldBeNil)

Powered by Google App Engine
This is Rietveld 408576698