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

Side by Side Diff: go/src/infra/gae/libs/meta/eg_test.go

Issue 1143053004: Simplify memory package interface. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: switch to blasters Created 5 years, 6 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 | « no previous file | go/src/infra/gae/libs/wrapper/gae/context.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 meta 5 package meta
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 9
10 "golang.org/x/net/context" 10 "golang.org/x/net/context"
11 11
12 "infra/gae/libs/wrapper" 12 "infra/gae/libs/wrapper"
13 "infra/gae/libs/wrapper/memory" 13 "infra/gae/libs/wrapper/memory"
14 14
15 . "github.com/smartystreets/goconvey/convey" 15 . "github.com/smartystreets/goconvey/convey"
16 ) 16 )
17 17
18 func TestGetEntityGroupVersion(t *testing.T) { 18 func TestGetEntityGroupVersion(t *testing.T) {
19 t.Parallel() 19 t.Parallel()
20 20
21 Convey("GetEntityGroupVersion", t, func() { 21 Convey("GetEntityGroupVersion", t, func() {
22 » » c := memory.Use(memory.Enable(context.Background())) 22 » » c := memory.Use(context.Background())
23 ds := wrapper.GetDS(c) 23 ds := wrapper.GetDS(c)
24 24
25 type A struct { 25 type A struct {
26 ID int64 `datastore:"-" goon:"id"` 26 ID int64 `datastore:"-" goon:"id"`
27 Val int 27 Val int
28 } 28 }
29 29
30 a := &A{Val: 10} 30 a := &A{Val: 10}
31 aKey, err := ds.Put(a) 31 aKey, err := ds.Put(a)
32 So(err, ShouldBeNil) 32 So(err, ShouldBeNil)
(...skipping 12 matching lines...) Expand all
45 So(err, ShouldBeNil) 45 So(err, ShouldBeNil)
46 So(v, ShouldEqual, 0) 46 So(v, ShouldEqual, 0)
47 47
48 tDs := ds.(wrapper.Testable) 48 tDs := ds.(wrapper.Testable)
49 tDs.BreakFeatures(nil, "Get") 49 tDs.BreakFeatures(nil, "Get")
50 50
51 v, err = GetEntityGroupVersion(c, aKey) 51 v, err = GetEntityGroupVersion(c, aKey)
52 So(err.Error(), ShouldContainSubstring, "INTERNAL_ERROR") 52 So(err.Error(), ShouldContainSubstring, "INTERNAL_ERROR")
53 }) 53 })
54 } 54 }
OLDNEW
« no previous file with comments | « no previous file | go/src/infra/gae/libs/wrapper/gae/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698