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

Unified Diff: go/src/infra/gae/libs/meta/eg_test.go

Issue 1222903002: Refactor current GAE abstraction library to be free of the SDK* (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: more fixes Created 5 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
Index: go/src/infra/gae/libs/meta/eg_test.go
diff --git a/go/src/infra/gae/libs/meta/eg_test.go b/go/src/infra/gae/libs/meta/eg_test.go
index 441b024429b04b68ad8405b311e534cebfc95de4..11e74108e9e55f9d6db21abd9a81f22920587fb9 100644
--- a/go/src/infra/gae/libs/meta/eg_test.go
+++ b/go/src/infra/gae/libs/meta/eg_test.go
@@ -9,8 +9,8 @@ import (
"golang.org/x/net/context"
- "infra/gae/libs/wrapper"
- "infra/gae/libs/wrapper/memory"
+ "infra/gae/libs/gae"
+ "infra/gae/libs/gae/memory"
. "github.com/smartystreets/goconvey/convey"
)
@@ -20,7 +20,7 @@ func TestGetEntityGroupVersion(t *testing.T) {
Convey("GetEntityGroupVersion", t, func() {
c := memory.Use(context.Background())
- ds := wrapper.GetDS(c)
+ rds := gae.GetRDS(c)
type A struct {
ID int64 `datastore:"-" goon:"id"`
@@ -28,24 +28,24 @@ func TestGetEntityGroupVersion(t *testing.T) {
}
a := &A{Val: 10}
- aKey, err := ds.Put(a)
+ aKey, err := rds.Put(rds.NewKey("A", "", 0, nil), a)
So(err, ShouldBeNil)
v, err := GetEntityGroupVersion(c, aKey)
So(err, ShouldBeNil)
So(v, ShouldEqual, 1)
- So(ds.Delete(aKey), ShouldBeNil)
+ So(rds.Delete(aKey), ShouldBeNil)
- v, err = GetEntityGroupVersion(c, ds.NewKey("madeUp", "thing", 0, aKey))
+ v, err = GetEntityGroupVersion(c, rds.NewKey("madeUp", "thing", 0, aKey))
So(err, ShouldBeNil)
So(v, ShouldEqual, 2)
- v, err = GetEntityGroupVersion(c, ds.NewKey("madeUp", "thing", 0, nil))
+ v, err = GetEntityGroupVersion(c, rds.NewKey("madeUp", "thing", 0, nil))
So(err, ShouldBeNil)
So(v, ShouldEqual, 0)
- tDs := ds.(wrapper.Testable)
+ tDs := rds.(gae.Testable)
tDs.BreakFeatures(nil, "Get")
v, err = GetEntityGroupVersion(c, aKey)

Powered by Google App Engine
This is Rietveld 408576698