| OLD | NEW |
| 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 } |
| OLD | NEW |