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

Unified Diff: impl/memory/taskqueue_test.go

Issue 1285703002: Add testable interface for datastore. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: fixes after Raw change Created 5 years, 4 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/memory/datastore_test.go ('k') | impl/memory/testing_utils_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/taskqueue_test.go
diff --git a/impl/memory/taskqueue_test.go b/impl/memory/taskqueue_test.go
index a7f6d076e3aa5afb0cf3a46ce9c04a9f408f3988..2e4f9b8767a8cca6bfd8989ddf48353ddb02df22 100644
--- a/impl/memory/taskqueue_test.go
+++ b/impl/memory/taskqueue_test.go
@@ -31,7 +31,7 @@ func TestTaskQueue(t *testing.T) {
c = Use(c)
tq := tqS.Get(c)
- tqt := tq.Testable()
+ tqt := tq.Raw().Testable()
So(tqt, ShouldNotBeNil)
So(tq, ShouldNotBeNil)
@@ -246,7 +246,7 @@ func TestTaskQueue(t *testing.T) {
Convey("can view regular tasks", func() {
dsS.Get(c).RunInTransaction(func(c context.Context) error {
- tqt := tqS.Get(c).Testable()
+ tqt := tqS.GetRaw(c).Testable()
So(tqt.GetScheduledTasks()["default"][t.Name], ShouldResemble, t)
So(tqt.GetTombstonedTasks()["default"][t2.Name], ShouldResemble, t2)
@@ -260,7 +260,7 @@ func TestTaskQueue(t *testing.T) {
err := dsS.Get(c).RunInTransaction(func(c context.Context) error {
tq := tqS.Get(c)
- tqt := tq.Testable()
+ tqt := tq.Raw().Testable()
So(tq.Add(t3, ""), ShouldBeNil)
So(t3.Name, ShouldEqual, "")
@@ -292,7 +292,7 @@ func TestTaskQueue(t *testing.T) {
dsS.Get(c).RunInTransaction(func(c context.Context) error {
ttq = tqS.Get(c)
- tqt := ttq.Testable()
+ tqt := ttq.Raw().Testable()
So(ttq.Add(t3, ""), ShouldBeNil)
@@ -321,7 +321,7 @@ func TestTaskQueue(t *testing.T) {
Convey("you can AddMulti as well", func() {
dsS.Get(c).RunInTransaction(func(c context.Context) error {
tq := tqS.Get(c)
- tqt := tq.Testable()
+ tqt := tq.Raw().Testable()
t.Name = ""
tasks := []*tqS.Task{t.Duplicate(), t.Duplicate(), t.Duplicate()}
@@ -349,7 +349,7 @@ func TestTaskQueue(t *testing.T) {
So(tqS.Get(c).Add(t, "meat").Error(), ShouldContainSubstring, "UNKNOWN_QUEUE")
Convey("unless you add it!", func() {
- tqS.Get(c).Testable().CreateQueue("meat")
+ tqS.GetRaw(c).Testable().CreateQueue("meat")
So(tqS.Get(c).Add(t, "meat"), ShouldBeNil)
})
« no previous file with comments | « impl/memory/datastore_test.go ('k') | impl/memory/testing_utils_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698