@@ -14,11 +14,11 @@ import (
1414
1515var CONTENT_PATH = "/terratest/sumologic/testapp.json"
1616
17- func getMetricRule (suffix string ) map [string ]interface {} {
17+ func getMetricRule (suffix string , sleep int ) map [string ]interface {} {
1818 return map [string ]interface {}{
1919 "metric_rule_name" : fmt .Sprintf ("MetricRule%s" , suffix ),
2020 "match_expression" : fmt .Sprintf ("%s=AWS/RDS DBClusterIdentifier=*" , suffix ),
21- "sleep" : 0 ,
21+ "sleep" : sleep ,
2222 "variables_to_extract" : []map [string ]interface {}{
2323 {
2424 "name" : suffix ,
@@ -158,8 +158,8 @@ func TestAllWithMultiInputs(t *testing.T) {
158158 "access_key" : common .SumologicAccessKey ,
159159 "environment" : common .SumologicEnvironment ,
160160 "managed_metric_rules" : map [string ]interface {}{
161- "MetricRuleOne" : getMetricRule (prefixOne ),
162- "MetricRuleTwo" : getMetricRule (prefixTwo ),
161+ "MetricRuleOne" : getMetricRule (prefixOne , 0 ),
162+ "MetricRuleTwo" : getMetricRule (prefixTwo , 11 ),
163163 },
164164 "managed_fields" : map [string ]interface {}{
165165 "FieldOne" : getField (strings .ToLower (prefixOne )),
@@ -199,7 +199,7 @@ func TestMetricRuleOnly(t *testing.T) {
199199 "access_key" : common .SumologicAccessKey ,
200200 "environment" : common .SumologicEnvironment ,
201201 "managed_metric_rules" : map [string ]interface {}{
202- "MetricRuleOne" : getMetricRule ("TestMetricRuleOnly" ),
202+ "MetricRuleOne" : getMetricRule ("TestMetricRuleOnly" , 5 ),
203203 },
204204 }
205205
@@ -335,7 +335,7 @@ func TestUpdatesOnly(t *testing.T) {
335335 "access_key" : common .SumologicAccessKey ,
336336 "environment" : common .SumologicEnvironment ,
337337 "managed_metric_rules" : map [string ]interface {}{
338- "MetricRuleOne" : getMetricRule ("TestMetricRuleUpdateOneOnly" ),
338+ "MetricRuleOne" : getMetricRule ("TestMetricRuleUpdateOneOnly" , 19 ),
339339 },
340340 }
341341
@@ -356,7 +356,7 @@ func TestUpdatesOnly(t *testing.T) {
356356 "access_key" : common .SumologicAccessKey ,
357357 "environment" : common .SumologicEnvironment ,
358358 "managed_metric_rules" : map [string ]interface {}{
359- "MetricRuleOne" : getMetricRule ("TestMetricRuleUpdayesTwo" ),
359+ "MetricRuleOne" : getMetricRule ("TestMetricRuleUpdayesTwo" , 28 ),
360360 },
361361 }
362362
0 commit comments