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

Side by Side Diff: common/tsmon/store/inmemory_test.go

Issue 1857643003: Revert of Migrate tsmon protos to proto3 (Closed) Base URL: git@github.com:luci/luci-go.git@master
Patch Set: Created 4 years, 8 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 | « common/tsmon/monitor/acq_test.go ('k') | common/tsmon/store/testing.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 package store 4 package store
5 5
6 import ( 6 import (
7 "testing" 7 "testing"
8 8
9 "github.com/golang/protobuf/proto"
9 "github.com/luci/luci-go/common/tsmon/target" 10 "github.com/luci/luci-go/common/tsmon/target"
10 "golang.org/x/net/context" 11 "golang.org/x/net/context"
11 ) 12 )
12 13
13 func TestInMemory(t *testing.T) { 14 func TestInMemory(t *testing.T) {
14 ctx := context.Background() 15 ctx := context.Background()
15 RunStoreImplementationTests(t, ctx, TestOptions{ 16 RunStoreImplementationTests(t, ctx, TestOptions{
16 Factory: func() Store { 17 Factory: func() Store {
17 » » » return NewInMemory(&target.Task{ServiceName: "default ta rget"}) 18 » » » return NewInMemory(&target.Task{ServiceName: proto.Strin g("default target")})
18 }, 19 },
19 RegistrationFinished: func(Store) {}, 20 RegistrationFinished: func(Store) {},
20 GetNumRegisteredMetrics: func(s Store) int { 21 GetNumRegisteredMetrics: func(s Store) int {
21 return len(s.(*inMemoryStore).data) 22 return len(s.(*inMemoryStore).data)
22 }, 23 },
23 }) 24 })
24 } 25 }
OLDNEW
« no previous file with comments | « common/tsmon/monitor/acq_test.go ('k') | common/tsmon/store/testing.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698