@@ -108,9 +108,9 @@ var testDatadogClusterAgentMetadata = []datadogAuthMetadataTestData{
108
108
{"" , map [string ]string {"useClusterAgentProxy" : "true" , "datadogMetricName" : "nginx-hits" , "datadogMetricNamespace" : "default" , "targetValue" : "2" , "type" : "global" }, map [string ]string {"token" : "token" , "datadogNamespace" : "datadog" , "datadogMetricsService" : "datadog-cluster-agent-metrics-api" , "unsafeSsl" : "true" , "authMode" : "bearer" }, false },
109
109
110
110
// TODO: Fix this failed test case
111
- //both metadata type and trigger type
111
+ // both metadata type and trigger type
112
112
{v2 .AverageValueMetricType , map [string ]string {"useClusterAgentProxy" : "true" , "datadogMetricName" : "nginx-hits" , "datadogMetricNamespace" : "default" , "targetValue" : "2" , "type" : "global" }, map [string ]string {"token" : "token" , "datadogNamespace" : "datadog" , "datadogMetricsService" : "datadog-cluster-agent-metrics-api" , "unsafeSsl" : "true" , "authMode" : "bearer" }, true },
113
- //missing DatadogMetric name
113
+ // missing DatadogMetric name
114
114
{"" , map [string ]string {"useClusterAgentProxy" : "true" , "datadogMetricNamespace" : "default" , "targetValue" : "2" , "type" : "global" }, map [string ]string {"token" : "token" , "datadogNamespace" : "datadog" , "datadogMetricsService" : "datadog-cluster-agent-metrics-api" , "unsafeSsl" : "true" , "authMode" : "bearer" }, true },
115
115
// missing DatadogMetric namespace
116
116
{"" , map [string ]string {"useClusterAgentProxy" : "true" , "datadogMetricName" : "nginx-hits" , "targetValue" : "2" , "type" : "global" }, map [string ]string {"token" : "token" , "datadogNamespace" : "datadog" , "datadogMetricsService" : "datadog-cluster-agent-metrics-api" , "unsafeSsl" : "true" , "authMode" : "bearer" }, true },
@@ -139,13 +139,13 @@ var testDatadogAPIMetadata = []datadogAuthMetadataTestData{
139
139
{"" , map [string ]string {"query" : "sum:trace.redis.command.hits{env:none,service:redis}.as_count()" , "queryValue" : "7" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, false },
140
140
// wrong type
141
141
{"" , map [string ]string {"query" : "sum:trace.redis.command.hits{env:none,service:redis}.as_count()" , "queryValue" : "7" , "type" : "invalid" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, true },
142
- //both metadata type and trigger type
142
+ // both metadata type and trigger type
143
143
{v2 .AverageValueMetricType , map [string ]string {"query" : "sum:trace.redis.command.hits{env:none,service:redis}.as_count()" , "queryValue" : "7" , "type" : "average" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, true },
144
- //missing query
144
+ // missing query
145
145
{"" , map [string ]string {"queryValue" : "7" , "type" : "average" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, true },
146
- //missing queryValue
146
+ // missing queryValue
147
147
{"" , map [string ]string {"query" : "sum:trace.redis.command.hits{env:none,service:redis}.as_count()" , "type" : "average" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, true },
148
- //wrong query value type
148
+ // wrong query value type
149
149
{"" , map [string ]string {"query" : "sum:trace.redis.command.hits{env:none,service:redis}.as_count()" , "queryValue" : "notanint" , "type" : "average" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, true },
150
150
// wrong queryAggregator value
151
151
{"" , map [string ]string {"query" : "sum:trace.redis.command.hits{env:none,service:redis}.as_count()" , "queryValue" : "notanint" , "queryAggegrator" : "1.0" , "type" : "average" , "age" : "60" }, map [string ]string {"apiKey" : "apiKey" , "appKey" : "appKey" , "datadogSite" : "datadogSite" }, true },
0 commit comments