Skip to content

Commit

Permalink
rename helper function
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
  • Loading branch information
bacherfl committed May 28, 2024
1 parent adcda48 commit 4ebb38a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/ottl/ottlfuncs/func_scale_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ func TestScale(t *testing.T) {
args: args{
value: &ottl.StandardGetSetter[any]{
Getter: func(ctx context.Context, tCtx any) (any, error) {
return getTestMetric(1, 4, 1, 3, []float64{1, 10}, []uint64{1, 2}, []float64{1.0}, 1, 1), nil
return getTestHistogramMetric(1, 4, 1, 3, []float64{1, 10}, []uint64{1, 2}, []float64{1.0}, 1, 1), nil
},
},
multiplier: 10.0,
},
wantFunc: func() any {
return getTestMetric(1, 40, 10, 30, []float64{10, 100}, []uint64{1, 2}, []float64{10.0}, 1, 1)
return getTestHistogramMetric(1, 40, 10, 30, []float64{10, 100}, []uint64{1, 2}, []float64{10.0}, 1, 1)
},
wantErr: false,
},
Expand All @@ -172,7 +172,7 @@ func TestScale(t *testing.T) {
}
}

func getTestMetric(count uint64, sum, min, max float64, bounds []float64, bucketCounts []uint64, exemplars []float64, start, timestamp pcommon.Timestamp) pmetric.Metric {
func getTestHistogramMetric(count uint64, sum, min, max float64, bounds []float64, bucketCounts []uint64, exemplars []float64, start, timestamp pcommon.Timestamp) pmetric.Metric {
metric := pmetric.NewMetric()
metric.SetName("test-metric")
metric.SetEmptyHistogram()
Expand Down

0 comments on commit 4ebb38a

Please sign in to comment.