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

Unified Diff: service/datastore/meta/namespaces_test.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. Created 4 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 | « service/datastore/meta/namespaces.go ('k') | service/datastore/multiarg.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/meta/namespaces_test.go
diff --git a/service/datastore/meta/namespaces_test.go b/service/datastore/meta/namespaces_test.go
index 6176df47866ac3ed9ed6fc3897dc3518c3b71054..994b4cc0caed292dc42e779891a54a65c76c7ef4 100644
--- a/service/datastore/meta/namespaces_test.go
+++ b/service/datastore/meta/namespaces_test.go
@@ -8,8 +8,9 @@ import (
"testing"
"github.com/luci/gae/impl/memory"
- "github.com/luci/gae/service/datastore"
+ ds "github.com/luci/gae/service/datastore"
"github.com/luci/gae/service/info"
+
"golang.org/x/net/context"
. "github.com/smartystreets/goconvey/convey"
@@ -24,22 +25,22 @@ func TestNamespaces(t *testing.T) {
// Call to add a datastore entry under the supplied namespace.
addNamespace := func(ns string) {
if ns != "" {
- ctx = info.Get(ctx).MustNamespace(ns)
+ ctx = info.MustNamespace(ctx, ns)
}
- err := datastore.Get(ctx).Raw().PutMulti(
- []*datastore.Key{
- datastore.Get(ctx).NewKey("Warblegarble", "", 1, nil),
+ err := ds.Raw(ctx).PutMulti(
+ []*ds.Key{
+ ds.NewKey(ctx, "Warblegarble", "", 1, nil),
},
- []datastore.PropertyMap{
- make(datastore.PropertyMap),
+ []ds.PropertyMap{
+ make(ds.PropertyMap),
},
- func(*datastore.Key, error) error { return nil })
+ func(*ds.Key, error) error { return nil })
if err != nil {
panic(err)
}
- datastore.Get(ctx).Testable().CatchupIndexes()
+ ds.GetTestable(ctx).CatchupIndexes()
}
Convey(`A datastore with no namespaces returns {}.`, func() {
« no previous file with comments | « service/datastore/meta/namespaces.go ('k') | service/datastore/multiarg.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698