CloudWatch: Refactor tests, remove unused parameters (#48815)

This commit is contained in:
Shirley
2022-05-08 09:27:03 +02:00
committed by GitHub
parent 99eaa0fc20
commit 5c2dee19d5
7 changed files with 93 additions and 77 deletions
+1 -5
View File
@@ -4,9 +4,7 @@ import "github.com/aws/aws-sdk-go/service/cloudwatch"
// queryRowResponse represents the GetMetricData response for a query row in the query editor.
type queryRowResponse struct {
ID string
ErrorCodes map[string]bool
PartialData bool
Labels []string
HasArithmeticError bool
ArithmeticErrorMessage string
@@ -14,15 +12,13 @@ type queryRowResponse struct {
StatusCode string
}
func newQueryRowResponse(id string) queryRowResponse {
func newQueryRowResponse() queryRowResponse {
return queryRowResponse{
ID: id,
ErrorCodes: map[string]bool{
maxMetricsExceeded: false,
maxQueryTimeRangeExceeded: false,
maxQueryResultsExceeded: false,
maxMatchingResultsExceeded: false},
PartialData: false,
HasArithmeticError: false,
ArithmeticErrorMessage: "",
Labels: []string{},