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

Side by Side Diff: impl/cloud/datastore_test.go

Issue 2217063003: Update cloud package. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Created 4 years, 4 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/cloud/datastore.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The LUCI Authors. All rights reserved. 1 // Copyright 2016 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 cloud 5 package cloud
6 6
7 import ( 7 import (
8 "crypto/rand" 8 "crypto/rand"
9 "encoding/hex" 9 "encoding/hex"
10 "fmt" 10 "fmt"
11 "os" 11 "os"
12 "testing" 12 "testing"
13 "time" 13 "time"
14 14
15 ds "github.com/luci/gae/service/datastore" 15 ds "github.com/luci/gae/service/datastore"
16 "github.com/luci/gae/service/info" 16 "github.com/luci/gae/service/info"
17 17
18 "cloud.google.com/go/datastore"
18 "github.com/luci/luci-go/common/errors" 19 "github.com/luci/luci-go/common/errors"
19 "golang.org/x/net/context" 20 "golang.org/x/net/context"
20 "google.golang.org/cloud/datastore"
21 21
22 . "github.com/smartystreets/goconvey/convey" 22 . "github.com/smartystreets/goconvey/convey"
23 ) 23 )
24 24
25 func mkProperties(index bool, vals ...interface{}) []ds.Property { 25 func mkProperties(index bool, vals ...interface{}) []ds.Property {
26 indexSetting := ds.ShouldIndex 26 indexSetting := ds.ShouldIndex
27 if !index { 27 if !index {
28 indexSetting = ds.NoIndex 28 indexSetting = ds.NoIndex
29 } 29 }
30 30
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 pmap := ds.PropertyMap{"$kind": mkp("Tes t"), "$id": mkp("quux")} 285 pmap := ds.PropertyMap{"$kind": mkp("Tes t"), "$id": mkp("quux")}
286 err = di.RunInTransaction(func(c context .Context) error { 286 err = di.RunInTransaction(func(c context .Context) error {
287 return ds.Get(c).Get(pmap) 287 return ds.Get(c).Get(pmap)
288 }, nil) 288 }, nil)
289 So(err, ShouldEqual, ds.ErrNoSuchEntity) 289 So(err, ShouldEqual, ds.ErrNoSuchEntity)
290 }) 290 })
291 }) 291 })
292 }) 292 })
293 }) 293 })
294 } 294 }
OLDNEW
« no previous file with comments | « impl/cloud/datastore.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698