Skip to content

Commit

Permalink
Fix alerting_rule_group_test (#1915)
Browse files Browse the repository at this point in the history
* Set correct value check

* More fixes
  • Loading branch information
spinillos authored Nov 19, 2024
1 parent 85e393d commit 2b68f37
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,10 @@ func TestAccRecordingRule(t *testing.T) {
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.record.0.metric", metric),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.record.0.from", "A"),
// ensure fields are cleared as expected
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.for", "0"),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.condition", ""),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.no_data_state", ""),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.exec_err_state", ""),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.for", "2m0s"),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.condition", "A"),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.no_data_state", "NoData"),
resource.TestCheckResourceAttr("grafana_rule_group.my_rule_group", "rule.0.exec_err_state", "Alerting"),
),
},
},
Expand Down

0 comments on commit 2b68f37

Please sign in to comment.