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

Side by Side Diff: logdog/appengine/coordinator/endpoints/logs/get_test.go

Issue 2626433004: Move "common/config" common types into cfgtypes. (Closed)
Patch Set: Created 3 years, 11 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
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 logs 5 package logs
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "errors" 9 "errors"
10 "fmt" 10 "fmt"
11 "math" 11 "math"
12 "testing" 12 "testing"
13 "time" 13 "time"
14 14
15 "github.com/luci/luci-go/common/clock" 15 "github.com/luci/luci-go/common/clock"
16 "github.com/luci/luci-go/common/config"
17 "github.com/luci/luci-go/common/data/recordio" 16 "github.com/luci/luci-go/common/data/recordio"
18 "github.com/luci/luci-go/common/iotools" 17 "github.com/luci/luci-go/common/iotools"
19 "github.com/luci/luci-go/common/proto/google" 18 "github.com/luci/luci-go/common/proto/google"
20 "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1" 19 "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1"
21 "github.com/luci/luci-go/logdog/api/logpb" 20 "github.com/luci/luci-go/logdog/api/logpb"
22 ct "github.com/luci/luci-go/logdog/appengine/coordinator/coordinatorTest " 21 ct "github.com/luci/luci-go/logdog/appengine/coordinator/coordinatorTest "
23 "github.com/luci/luci-go/logdog/common/archive" 22 "github.com/luci/luci-go/logdog/common/archive"
24 "github.com/luci/luci-go/logdog/common/renderer" 23 "github.com/luci/luci-go/logdog/common/renderer"
25 "github.com/luci/luci-go/logdog/common/storage" 24 "github.com/luci/luci-go/logdog/common/storage"
26 "github.com/luci/luci-go/logdog/common/types" 25 "github.com/luci/luci-go/logdog/common/types"
26 "github.com/luci/luci-go/luci_config/common/cfgtypes"
27 27
28 "github.com/luci/gae/filter/featureBreaker" 28 "github.com/luci/gae/filter/featureBreaker"
29 29
30 "github.com/golang/protobuf/proto" 30 "github.com/golang/protobuf/proto"
31 "golang.org/x/net/context" 31 "golang.org/x/net/context"
32 32
33 . "github.com/luci/luci-go/common/testing/assertions" 33 . "github.com/luci/luci-go/common/testing/assertions"
34 . "github.com/smartystreets/goconvey/convey" 34 . "github.com/smartystreets/goconvey/convey"
35 ) 35 )
36 36
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 } 76 }
77 77
78 func testGetImpl(t *testing.T, archived bool) { 78 func testGetImpl(t *testing.T, archived bool) {
79 Convey(fmt.Sprintf(`With a testing configuration, a Get request (archive d=%v)`, archived), t, func() { 79 Convey(fmt.Sprintf(`With a testing configuration, a Get request (archive d=%v)`, archived), t, func() {
80 c, env := ct.Install() 80 c, env := ct.Install()
81 81
82 svr := New() 82 svr := New()
83 83
84 // di is a datastore bound to the test project namespace. 84 // di is a datastore bound to the test project namespace.
85 » » const project = config.ProjectName("proj-foo") 85 » » const project = cfgtypes.ProjectName("proj-foo")
86 86
87 // Generate our test stream. 87 // Generate our test stream.
88 tls := ct.MakeStream(c, "proj-foo", "testing/+/foo/bar") 88 tls := ct.MakeStream(c, "proj-foo", "testing/+/foo/bar")
89 89
90 putLogStream := func(c context.Context) { 90 putLogStream := func(c context.Context) {
91 if err := tls.Put(c); err != nil { 91 if err := tls.Put(c); err != nil {
92 panic(err) 92 panic(err)
93 } 93 }
94 } 94 }
95 putLogStream(c) 95 putLogStream(c)
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 t.Parallel() 670 t.Parallel()
671 671
672 testGetImpl(t, false) 672 testGetImpl(t, false)
673 } 673 }
674 674
675 func TestGetArchived(t *testing.T) { 675 func TestGetArchived(t *testing.T) {
676 t.Parallel() 676 t.Parallel()
677 677
678 testGetImpl(t, true) 678 testGetImpl(t, true)
679 } 679 }
OLDNEW
« no previous file with comments | « logdog/appengine/coordinator/endpoints/logs/get.go ('k') | logdog/appengine/coordinator/endpoints/logs/list_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698