Commit 8616f1be by Erik Sundell Committed by Marcus Efraimsson

Chore: Fix go vet problem (#21568)

parent ca848296
...@@ -60,10 +60,11 @@ func TestCloudWatchResponseParser(t *testing.T) { ...@@ -60,10 +60,11 @@ func TestCloudWatchResponseParser(t *testing.T) {
Period: 60, Period: 60,
Alias: "{{LoadBalancer}} Expanded", Alias: "{{LoadBalancer}} Expanded",
} }
series, _, err := parseGetMetricDataTimeSeries(resp, query) series, partialData, err := parseGetMetricDataTimeSeries(resp, query)
timeSeries := (*series)[0] timeSeries := (*series)[0]
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(partialData, ShouldBeFalse)
So(timeSeries.Name, ShouldEqual, "lb2 Expanded") So(timeSeries.Name, ShouldEqual, "lb2 Expanded")
So(timeSeries.Tags["LoadBalancer"], ShouldEqual, "lb2") So(timeSeries.Tags["LoadBalancer"], ShouldEqual, "lb2")
}) })
...@@ -116,10 +117,11 @@ func TestCloudWatchResponseParser(t *testing.T) { ...@@ -116,10 +117,11 @@ func TestCloudWatchResponseParser(t *testing.T) {
Period: 60, Period: 60,
Alias: "{{LoadBalancer}} Expanded", Alias: "{{LoadBalancer}} Expanded",
} }
series, _, err := parseGetMetricDataTimeSeries(resp, query) series, partialData, err := parseGetMetricDataTimeSeries(resp, query)
timeSeries := (*series)[0] timeSeries := (*series)[0]
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(partialData, ShouldBeFalse)
So(timeSeries.Name, ShouldEqual, "lb1 Expanded") So(timeSeries.Name, ShouldEqual, "lb1 Expanded")
So(timeSeries.Tags["LoadBalancer"], ShouldEqual, "lb1") So(timeSeries.Tags["LoadBalancer"], ShouldEqual, "lb1")
}) })
...@@ -172,9 +174,10 @@ func TestCloudWatchResponseParser(t *testing.T) { ...@@ -172,9 +174,10 @@ func TestCloudWatchResponseParser(t *testing.T) {
Period: 60, Period: 60,
Alias: "{{LoadBalancer}} Expanded", Alias: "{{LoadBalancer}} Expanded",
} }
series, _, err := parseGetMetricDataTimeSeries(resp, query) series, partialData, err := parseGetMetricDataTimeSeries(resp, query)
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(partialData, ShouldBeFalse)
So((*series)[0].Name, ShouldEqual, "lb3 Expanded") So((*series)[0].Name, ShouldEqual, "lb3 Expanded")
So((*series)[1].Name, ShouldEqual, "lb4 Expanded") So((*series)[1].Name, ShouldEqual, "lb4 Expanded")
}) })
...@@ -212,10 +215,11 @@ func TestCloudWatchResponseParser(t *testing.T) { ...@@ -212,10 +215,11 @@ func TestCloudWatchResponseParser(t *testing.T) {
Period: 60, Period: 60,
Alias: "{{namespace}}_{{metric}}_{{stat}}", Alias: "{{namespace}}_{{metric}}_{{stat}}",
} }
series, _, err := parseGetMetricDataTimeSeries(resp, query) series, partialData, err := parseGetMetricDataTimeSeries(resp, query)
timeSeries := (*series)[0] timeSeries := (*series)[0]
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(partialData, ShouldBeFalse)
So(timeSeries.Name, ShouldEqual, "AWS/ApplicationELB_TargetResponseTime_Average") So(timeSeries.Name, ShouldEqual, "AWS/ApplicationELB_TargetResponseTime_Average")
So(timeSeries.Tags["LoadBalancer"], ShouldEqual, "lb") So(timeSeries.Tags["LoadBalancer"], ShouldEqual, "lb")
So(timeSeries.Points[0][0].String(), ShouldEqual, null.FloatFrom(10.0).String()) So(timeSeries.Points[0][0].String(), ShouldEqual, null.FloatFrom(10.0).String())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment