| Index: impl/prod/everything_test.go
|
| diff --git a/impl/prod/everything_test.go b/impl/prod/everything_test.go
|
| index 53024339c1d8df023e4ab33c0e0769d40e307435..577c3f46c14c4e7cead3c754d88c68bac9f25d31 100644
|
| --- a/impl/prod/everything_test.go
|
| +++ b/impl/prod/everything_test.go
|
| @@ -63,6 +63,29 @@ func TestBasicDatastore(t *testing.T) {
|
| So(ds.MakeKey("Hello", "world").Namespace(), ShouldEqual, "wat")
|
| })
|
|
|
| + Convey("Can get non-transactional context", func() {
|
| + ctx, err := inf.Namespace("foo")
|
| + So(err, ShouldBeNil)
|
| + ds = datastore.Get(ctx)
|
| + inf = info.Get(ctx)
|
| +
|
| + ds.RunInTransaction(func(ctx context.Context) error {
|
| + So(ds.MakeKey("Foo", "bar").Namespace(), ShouldEqual, "foo")
|
| +
|
| + So(ds.Put(&TestStruct{ValueI: []int64{100}}), ShouldBeNil)
|
| +
|
| + err = datastore.GetNoTxn(ctx).RunInTransaction(func(ctx context.Context) error {
|
| + ds = datastore.Get(ctx)
|
| + So(ds.MakeKey("Foo", "bar").Namespace(), ShouldEqual, "foo")
|
| + So(ds.Put(&TestStruct{ValueI: []int64{100}}), ShouldBeNil)
|
| + return nil
|
| + }, nil)
|
| + So(err, ShouldBeNil)
|
| +
|
| + return nil
|
| + }, nil)
|
| + })
|
| +
|
| Convey("Can Put/Get", func() {
|
| orig := TestStruct{
|
| ValueI: []int64{1, 7, 946688461000000, 996688461000000},
|
|
|