From 1ec8c978e2b5af6fe35a8eab65de888d3af4b1f1 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:16:37 +0200 Subject: [PATCH] Use the constructor --- output/cloud/expv2/sink_test.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/output/cloud/expv2/sink_test.go b/output/cloud/expv2/sink_test.go index 5257e1ffb8f..5d0fa243ee6 100644 --- a/output/cloud/expv2/sink_test.go +++ b/output/cloud/expv2/sink_test.go @@ -1,7 +1,6 @@ package expv2 import ( - "math" "testing" "github.com/stretchr/testify/assert" @@ -17,14 +16,7 @@ func TestNewSink(t *testing.T) { {metrics.Counter, &counter{}}, {metrics.Gauge, &gauge{}}, {metrics.Rate, &rate{}}, - { - metrics.Trend, - &histogram{ - Buckets: map[uint32]uint32{}, - Max: -math.MaxFloat64, - Min: math.MaxFloat64, - }, - }, + {metrics.Trend, newHistogram()}, } for _, tc := range tests { assert.Equal(t, tc.exp, newMetricValue(tc.mt))