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

Unified Diff: service/datastore/pls_test.go

Issue 1425283002: service/datastore: Call MGS GetAllMeta() in Save() (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: Add support/handling for invalid codec. Created 5 years, 2 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 | « service/datastore/pls_impl.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/pls_test.go
diff --git a/service/datastore/pls_test.go b/service/datastore/pls_test.go
index 0953da3d7c73c4d2ae1dec78613ef60e870b41d1..bc8499ebf46915f52bb4af1749080b66a2335c5d 100644
--- a/service/datastore/pls_test.go
+++ b/service/datastore/pls_test.go
@@ -1748,6 +1748,9 @@ func TestMeta(t *testing.T) {
So(props, ShouldResemble, PropertyMap{
"$kind": []Property{mpNI("")},
})
+
+ _, err := pls.Save(true)
+ So(err, ShouldNotBeNil)
})
})
@@ -1871,8 +1874,8 @@ func TestMeta(t *testing.T) {
So(idp.id, ShouldEqual, 27)
So(mgs.GetAllMeta(), ShouldResemble, PropertyMap{
- "$id": {MkPropertyNI("happy|27")},
- "$kind": {MkPropertyNI("CoolKind")},
+ "$id": {mpNI("happy|27")},
+ "$kind": {mpNI("CoolKind")},
})
})
@@ -1891,13 +1894,20 @@ func TestMeta(t *testing.T) {
So(ko.customKind, ShouldEqual, "")
So(mgs.GetAllMeta(), ShouldResemble, PropertyMap{
- "$id": {MkPropertyNI(20)},
- "$kind": {MkPropertyNI("KindOverride")},
+ "$id": {mpNI(20)},
+ "$kind": {mpNI("KindOverride")},
})
ko.customKind = "wut"
So(mgs.GetAllMeta(), ShouldResemble, PropertyMap{
- "$id": {MkPropertyNI(20)},
- "$kind": {MkPropertyNI("wut")},
+ "$id": {mpNI(20)},
+ "$kind": {mpNI("wut")},
+ })
+
+ props, err := GetPLS(ko).Save(true)
+ So(err, ShouldBeNil)
+ So(props, ShouldResemble, PropertyMap{
+ "$id": {mpNI(20)},
+ "$kind": {mpNI("wut")},
})
})
})
« no previous file with comments | « service/datastore/pls_impl.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698