mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 03:11:01 -06:00
CloudWatch: Fix ordering of map to resolve flaky test (#21572)
This commit is contained in:
parent
e18d35add4
commit
303bbb9900
@ -2,6 +2,7 @@ package cloudwatch
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@ -80,7 +81,14 @@ func parseGetMetricDataTimeSeries(metricDataResults map[string]*cloudwatch.Metri
|
||||
Points: make([]tsdb.TimePoint, 0),
|
||||
}
|
||||
|
||||
for key, values := range query.Dimensions {
|
||||
keys := make([]string, 0)
|
||||
for k := range query.Dimensions {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, key := range keys {
|
||||
values := query.Dimensions[key]
|
||||
if len(values) == 1 && values[0] != "*" {
|
||||
series.Tags[key] = values[0]
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user