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

Side by Side Diff: impl/memory/datastore_query_execution_test.go

Issue 2353063004: Add "MkKeyContext" KeyContext generation function. (Closed)
Patch Set: Created 4 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/memory/datastore_query_execution.go ('k') | impl/memory/datastore_query_test.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 LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package memory 5 package memory
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "strings" 9 "strings"
10 "testing" 10 "testing"
11 "time" 11 "time"
12 12
13 "github.com/luci/gae/service/blobstore" 13 "github.com/luci/gae/service/blobstore"
14 ds "github.com/luci/gae/service/datastore" 14 ds "github.com/luci/gae/service/datastore"
15 "github.com/luci/gae/service/info" 15 "github.com/luci/gae/service/info"
16 "golang.org/x/net/context" 16 "golang.org/x/net/context"
17 17
18 . "github.com/luci/luci-go/common/testing/assertions" 18 . "github.com/luci/luci-go/common/testing/assertions"
19 . "github.com/smartystreets/goconvey/convey" 19 . "github.com/smartystreets/goconvey/convey"
20 ) 20 )
21 21
22 func mkKey(appID, namespace string, elems ...interface{}) *ds.Key { 22 func mkKey(appID, namespace string, elems ...interface{}) *ds.Key {
23 » return ds.KeyContext{appID, namespace}.MakeKey(elems...) 23 » return ds.MkKeyContext(appID, namespace).MakeKey(elems...)
24 } 24 }
25 25
26 type qExpect struct { 26 type qExpect struct {
27 q *ds.Query 27 q *ds.Query
28 inTxn bool 28 inTxn bool
29 29
30 get []ds.PropertyMap 30 get []ds.PropertyMap
31 keys []*ds.Key 31 keys []*ds.Key
32 count int 32 count int
33 } 33 }
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 v, ok := actual.(error) 634 v, ok := actual.(error)
635 if !ok { 635 if !ok {
636 return fmt.Sprintf("type of 'actual' must be error, not %T", act ual) 636 return fmt.Sprintf("type of 'actual' must be error, not %T", act ual)
637 } 637 }
638 if v == nil || v == ds.Stop { 638 if v == nil || v == ds.Stop {
639 return "" 639 return ""
640 } 640 }
641 return fmt.Sprintf("expected success value, not %v", v) 641 return fmt.Sprintf("expected success value, not %v", v)
642 } 642 }
OLDNEW
« no previous file with comments | « impl/memory/datastore_query_execution.go ('k') | impl/memory/datastore_query_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698