forked from mirrors/statsd_exporter
Bring back test cases after rebase problem
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
This commit is contained in:
parent
7afa060ce4
commit
c41fa101f5
1 changed files with 42 additions and 0 deletions
|
@ -401,6 +401,48 @@ func TestConflictingMetrics(t *testing.T) {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "histogram vs counter",
|
||||
expected: []float64{2},
|
||||
in: event.Events{
|
||||
&event.ObserverEvent{
|
||||
OMetricName: "histogram_test1",
|
||||
OValue: 2,
|
||||
},
|
||||
&event.CounterEvent{
|
||||
CMetricName: "histogram_test1_count",
|
||||
CValue: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "histogram vs counter with sum prefix",
|
||||
expected: []float64{2},
|
||||
in: event.Events{
|
||||
&event.ObserverEvent{
|
||||
OMetricName: "histogram_test1",
|
||||
OValue: 2,
|
||||
},
|
||||
&event.CounterEvent{
|
||||
CMetricName: "histogram_test1_sum",
|
||||
CValue: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "histogram vs counter with bucket suffix",
|
||||
expected: []float64{2},
|
||||
in: event.Events{
|
||||
&event.ObserverEvent{
|
||||
OMetricName: "histogram_test1",
|
||||
OValue: 2,
|
||||
},
|
||||
&event.CounterEvent{
|
||||
CMetricName: "histogram_test1_bucket",
|
||||
CValue: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "counter vs histogram",
|
||||
expected: []float64{1},
|
||||
|
|
Loading…
Reference in a new issue