Chore: Convert CloudWatch metrics to data frames (#27449)

* CloudWatch: Convert metrics results to data frames

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: kay delaney <kay@grafana.com>
This commit is contained in:
Arve Knudsen
2020-10-06 13:45:58 +02:00
committed by GitHub
co-authored by kay delaney
parent 810c327e31
commit 0a2ef086b3
13 changed files with 201 additions and 170 deletions
@@ -72,7 +72,7 @@ func TestMetricDataQueryBuilder_buildSearchExpression(t *testing.T) {
}
res := buildSearchExpression(query, "Average")
assert.Equal(t, res, `REMOVE_EMPTY(SEARCH('{AWS/EC2,"LoadBalancer"} MetricName="CPUUtilization"', 'Average', 300))`)
assert.Equal(t, `REMOVE_EMPTY(SEARCH('{AWS/EC2,"LoadBalancer"} MetricName="CPUUtilization"', 'Average', 300))`, res)
})
t.Run("Query has three dimension values for two given dimension keys, and one value is a star", func(t *testing.T) {