Cloudwatch: Fix issue with field calculation transform not working properly with Cloudwatch data (#28761)
* Cloudwatch: Fix issue with reducer transform not working properly with Cloudwatch data * Updated go sdk and updated code * CloudWatch: Improve test Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
651ab5677c
commit
fa567de9b8
@@ -310,10 +310,13 @@ func TestCloudWatchResponseParser(t *testing.T) {
|
||||
frame := frames[0]
|
||||
assert.False(t, partialData)
|
||||
assert.Equal(t, "AWS/ApplicationELB_TargetResponseTime_Average", frame.Name)
|
||||
assert.Equal(t, "Time", frame.Fields[0].Name)
|
||||
assert.Equal(t, "lb", frame.Fields[1].Labels["LoadBalancer"])
|
||||
assert.Equal(t, 10.0, *frame.Fields[1].At(0).(*float64))
|
||||
assert.Equal(t, 20.0, *frame.Fields[1].At(1).(*float64))
|
||||
assert.Nil(t, frame.Fields[1].At(2))
|
||||
assert.Equal(t, 30.0, *frame.Fields[1].At(3).(*float64))
|
||||
assert.Equal(t, "Value", frame.Fields[1].Name)
|
||||
assert.Equal(t, "", frame.Fields[1].Config.DisplayName)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user