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

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

Issue 1854583002: 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"
10 "github.com/luci/luci-go/common/tsmon/target" 9 "github.com/luci/luci-go/common/tsmon/target"
11 "golang.org/x/net/context" 10 "golang.org/x/net/context"
12 ) 11 )
13 12
14 func TestInMemory(t *testing.T) { 13 func TestInMemory(t *testing.T) {
15 ctx := context.Background() 14 ctx := context.Background()
16 RunStoreImplementationTests(t, ctx, TestOptions{ 15 RunStoreImplementationTests(t, ctx, TestOptions{
17 Factory: func() Store { 16 Factory: func() Store {
18 » » » return NewInMemory(&target.Task{ServiceName: proto.Strin g("default target")}) 17 » » » return NewInMemory(&target.Task{ServiceName: "default ta rget"})
19 }, 18 },
20 RegistrationFinished: func(Store) {}, 19 RegistrationFinished: func(Store) {},
21 GetNumRegisteredMetrics: func(s Store) int { 20 GetNumRegisteredMetrics: func(s Store) int {
22 return len(s.(*inMemoryStore).data) 21 return len(s.(*inMemoryStore).data)
23 }, 22 },
24 }) 23 })
25 } 24 }
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