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

Unified Diff: common/tsmon/metric/metric_test.go

Issue 2290993002: Always set presence/up from go tsmon apps. (Closed)
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/tsmon/middleware.go ('k') | common/tsmon/metric/standard_metrics.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/tsmon/metric/metric_test.go
diff --git a/common/tsmon/metric/metric_test.go b/common/tsmon/metric/metric_test.go
index 19aa95edd2c0b4d2b951d4fa9d62224aca0f4573..0aa33405604cbbc2e33faf358ad74dda724ac151 100644
--- a/common/tsmon/metric/metric_test.go
+++ b/common/tsmon/metric/metric_test.go
@@ -7,12 +7,8 @@ package metric
import (
"testing"
- "github.com/golang/protobuf/proto"
"github.com/luci/luci-go/common/tsmon"
"github.com/luci/luci-go/common/tsmon/distribution"
- "github.com/luci/luci-go/common/tsmon/monitor"
- "github.com/luci/luci-go/common/tsmon/store"
- "github.com/luci/luci-go/common/tsmon/target"
"github.com/luci/luci-go/common/tsmon/types"
"golang.org/x/net/context"
@@ -20,11 +16,8 @@ import (
)
func makeContext() context.Context {
- return tsmon.WithState(context.Background(), &tsmon.State{
- S: store.NewInMemory(&target.Task{ServiceName: proto.String("default target")}),
- M: monitor.NewNilMonitor(),
- RegisteredMetrics: map[string]types.Metric{},
- })
+ ret, _ := tsmon.WithDummyInMemory(context.Background())
+ return ret
}
func TestMetrics(t *testing.T) {
« no previous file with comments | « appengine/tsmon/middleware.go ('k') | common/tsmon/metric/standard_metrics.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698