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

Unified Diff: service/datastore/datastore_test.go

Issue 1530503003: Return error on Get(*Key). (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: Created 5 years 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/datastore.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service/datastore/datastore_test.go
diff --git a/service/datastore/datastore_test.go b/service/datastore/datastore_test.go
index 2e3b7fa1ba5e922558f5ff0b52ccfef76a18b38d..0ca5c3f94be2dcdf090d5913e7da8681437d212b 100644
--- a/service/datastore/datastore_test.go
+++ b/service/datastore/datastore_test.go
@@ -410,6 +410,10 @@ func TestPut(t *testing.T) {
So(ds.Put(cs), ShouldErrLike, "invalid Put input type")
})
+ Convey("get with *Key is an error", func() {
+ So(ds.Get(&Key{}), ShouldErrLike, "invalid Get input type: *datastore.Key")
+ })
+
Convey("struct with no $kind is an error", func() {
s := MGSWithNoKind{}
So(ds.Put(&s), ShouldErrLike, "unable to extract $kind")
« no previous file with comments | « service/datastore/datastore.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698