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

Unified Diff: impl/prod/raw_datastore_type_converter_test.go

Issue 1367003002: Add missing Count api (Closed) Base URL: https://github.com/luci/gae.git@move_serialization_helpers
Patch Set: Created 5 years, 3 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 | « impl/prod/raw_datastore.go ('k') | service/datastore/datastore.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/raw_datastore_type_converter_test.go
diff --git a/impl/prod/raw_datastore_type_converter_test.go b/impl/prod/raw_datastore_type_converter_test.go
index 357bbd5952f93767dd0ec8ad0527fcbb5fc942bd..77f341e43f4fcc8d3e7f4709a8db849c33f7c558 100644
--- a/impl/prod/raw_datastore_type_converter_test.go
+++ b/impl/prod/raw_datastore_type_converter_test.go
@@ -78,10 +78,14 @@ func TestBasicDatastore(t *testing.T) {
time.Sleep(time.Second)
Convey("Can query", func() {
- ds.Run(dstore.NewQuery("TestStruct"), func(ts *TestStruct, _ dstore.CursorCB) bool {
+ q := dstore.NewQuery("TestStruct")
+ ds.Run(q, func(ts *TestStruct, _ dstore.CursorCB) bool {
So(*ts, ShouldResemble, orig)
return true
})
+ count, err := ds.Count(q)
+ So(err, ShouldBeNil)
+ So(count, ShouldEqual, 1)
})
Convey("Can project", func() {
@@ -120,6 +124,10 @@ func TestBasicDatastore(t *testing.T) {
"ValueBS": {mp("zurple")},
},
})
+
+ count, err := ds.Count(q)
+ So(err, ShouldBeNil)
+ So(count, ShouldEqual, 4)
})
})
« no previous file with comments | « impl/prod/raw_datastore.go ('k') | service/datastore/datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698