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

Unified Diff: impl/prod/everything_test.go

Issue 2986533002: [datastore] Fix querying with []byte. (Closed)
Patch Set: add crappy test 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 | « no previous file | impl/prod/raw_datastore.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/everything_test.go
diff --git a/impl/prod/everything_test.go b/impl/prod/everything_test.go
index 09e954e401519a7e9eeba368153cc1b28cd5ae7f..2f8432de261f8efda62e93528c74f09c5fcfa9d2 100644
--- a/impl/prod/everything_test.go
+++ b/impl/prod/everything_test.go
@@ -169,6 +169,16 @@ func TestBasicDatastore(t *testing.T) {
So(count, ShouldEqual, 1)
})
+ Convey("Can query for bytes", func() {
+ q := ds.NewQuery("TestStruct").Eq("ValueBS", []byte("allo"))
+ ds.Run(ctx, q, func(ts *TestStruct) {
+ So(*ts, ShouldResemble, orig)
+ })
+ count, err := ds.Count(ctx, q)
+ So(err, ShouldBeNil)
+ So(count, ShouldEqual, 1)
+ })
+
Convey("Can project", func() {
q := ds.NewQuery("TestStruct").Project("ValueS")
rslts := []ds.PropertyMap{}
« no previous file with comments | « no previous file | impl/prod/raw_datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698