We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e662be commit 08e2e54Copy full SHA for 08e2e54
cmd/agent/app/reporter/connect_metrics_test.go
@@ -53,4 +53,8 @@ func TestConnectMetrics(t *testing.T) {
53
54
cm.RecordTarget("collector-host")
55
assert.Equal(t, `"collector-host"`, expvar.Get("gRPCTarget").String())
56
+
57
+ // since expvars are singletons, the second constructor should grab the same var
58
+ cm2 := NewConnectMetrics(mf)
59
+ assert.Same(t, cm.target, cm2.target)
60
}
0 commit comments