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

Side by Side Diff: impl/dummy/dummy_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 unified diff | Download patch
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/datastore.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package dummy 5 package dummy
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 9
10 dsS "github.com/luci/gae/service/datastore" 10 dsS "github.com/luci/gae/service/datastore"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 defer p() 43 defer p()
44 infoS.Get(c).Datacenter() 44 infoS.Get(c).Datacenter()
45 }, ShouldPanicWith, "dummy: method Info.Datacenter is no t implemented") 45 }, ShouldPanicWith, "dummy: method Info.Datacenter is no t implemented")
46 }) 46 })
47 47
48 Convey("Datastore", func() { 48 Convey("Datastore", func() {
49 c = dsS.SetRaw(c, Datastore()) 49 c = dsS.SetRaw(c, Datastore())
50 So(dsS.Get(c), ShouldNotBeNil) 50 So(dsS.Get(c), ShouldNotBeNil)
51 So(func() { 51 So(func() {
52 defer p() 52 defer p()
53 » » » » dsS.Get(c).DecodeKey("wut") 53 » » » » _, _ = dsS.Get(c).DecodeCursor("wut")
54 » » » }, ShouldPanicWith, "dummy: method Datastore.DecodeKey i s not implemented") 54 » » » }, ShouldPanicWith, "dummy: method Datastore.DecodeCurso r is not implemented")
55 }) 55 })
56 56
57 Convey("Memcache", func() { 57 Convey("Memcache", func() {
58 c = mcS.SetRaw(c, Memcache()) 58 c = mcS.SetRaw(c, Memcache())
59 So(mcS.Get(c), ShouldNotBeNil) 59 So(mcS.Get(c), ShouldNotBeNil)
60 So(func() { 60 So(func() {
61 defer p() 61 defer p()
62 » » » » mcS.Get(c).Add(nil) 62 » » » » _ = mcS.Get(c).Add(nil)
63 }, ShouldPanicWith, "dummy: method Memcache.AddMulti is not implemented") 63 }, ShouldPanicWith, "dummy: method Memcache.AddMulti is not implemented")
64 }) 64 })
65 65
66 Convey("TaskQueue", func() { 66 Convey("TaskQueue", func() {
67 c = tqS.SetRaw(c, TaskQueue()) 67 c = tqS.SetRaw(c, TaskQueue())
68 So(tqS.Get(c), ShouldNotBeNil) 68 So(tqS.Get(c), ShouldNotBeNil)
69 So(func() { 69 So(func() {
70 defer p() 70 defer p()
71 » » » » tqS.Get(c).Purge("") 71 » » » » _ = tqS.Get(c).Purge("")
72 }, ShouldPanicWith, "dummy: method TaskQueue.Purge is no t implemented") 72 }, ShouldPanicWith, "dummy: method TaskQueue.Purge is no t implemented")
73 }) 73 })
74 74
75 }) 75 })
76 } 76 }
OLDNEW
« no previous file with comments | « impl/dummy/dummy.go ('k') | impl/memory/datastore.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698