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

Unified Diff: impl/prod/raw_datastore_type_converter_test.go

Issue 1355783002: Refactor keys and queries in datastore service and implementation. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: appease errcheck 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_type_converter.go ('k') | service/datastore/checkfilter.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 437b945d7442a3c19aa58d2a090fe196c9802704..02549842b8c7b5c7190561b73305d1e29280b4e4 100644
--- a/impl/prod/raw_datastore_type_converter_test.go
+++ b/impl/prod/raw_datastore_type_converter_test.go
@@ -29,7 +29,7 @@ type TestStruct struct {
ValueS []string
ValueF []float64
ValueBS [][]byte // "ByteString"
- ValueK []dstore.Key
+ ValueK []*dstore.Key
ValueBK []blobstore.Key
ValueGP []dstore.GeoPoint
}
@@ -57,7 +57,7 @@ func TestBasicDatastore(t *testing.T) {
[]byte("world"),
[]byte("zurple"),
},
- ValueK: []dstore.Key{
+ ValueK: []*dstore.Key{
ds.NewKey("Something", "Cool", 0, nil),
ds.NewKey("Something", "", 1, nil),
ds.NewKey("Something", "Recursive", 0,
@@ -78,14 +78,14 @@ func TestBasicDatastore(t *testing.T) {
time.Sleep(time.Second)
Convey("Can query", func() {
- ds.Run(ds.NewQuery("TestStruct"), func(ts *TestStruct, _ dstore.CursorCB) bool {
+ ds.Run(dstore.NewQuery("TestStruct"), func(ts *TestStruct, _ dstore.CursorCB) bool {
So(*ts, ShouldResemble, orig)
return true
})
})
Convey("Can project", func() {
- q := ds.NewQuery("TestStruct").Project("ValueS")
+ q := dstore.NewQuery("TestStruct").Project("ValueS")
rslts := []dstore.PropertyMap{}
So(ds.GetAll(q, &rslts), ShouldBeNil)
So(rslts, ShouldResemble, []dstore.PropertyMap{
@@ -99,7 +99,7 @@ func TestBasicDatastore(t *testing.T) {
},
})
- q = ds.NewQuery("TestStruct").Project("ValueBS")
+ q = dstore.NewQuery("TestStruct").Project("ValueBS")
rslts = []dstore.PropertyMap{}
So(ds.GetAll(q, &rslts), ShouldBeNil)
So(rslts, ShouldResemble, []dstore.PropertyMap{
@@ -137,7 +137,7 @@ func TestBasicDatastore(t *testing.T) {
So(pm["Time"][0].Value(), ShouldResemble, rslt["Time"][0].Value())
- q := ds.NewQuery("Something").Project("Time")
+ q := dstore.NewQuery("Something").Project("Time")
all := []dstore.PropertyMap{}
So(ds.GetAll(q, &all), ShouldBeNil)
So(len(all), ShouldEqual, 1)
« no previous file with comments | « impl/prod/raw_datastore_type_converter.go ('k') | service/datastore/checkfilter.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698