Skip to content

Commit

Permalink
fix: improve ac tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brumarqu-te committed May 10, 2024
1 parent 03f213c commit cf60211
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions thousandeyes/resource_alert_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ func TestAccThousandEyesAlertRule(t *testing.T) {
return testAccCheckResourceDestroy(resourceList, state)
},
checkCreateFunc: []resource.TestCheckFunc{
//alert rule is created
//with 3 required violating rounds
resource.TestCheckResourceAttr(alertRuleResourceName, "rounds_violating_required", "3"),
//and with one tests associated
resource.TestCheckResourceAttr(alertRuleResourceName, "test_ids.#", "1"),
},
checkUpdateFunc: []resource.TestCheckFunc{
//alert rule is updated
//to 4 required violating rounds
resource.TestCheckResourceAttr(alertRuleResourceName, "rounds_violating_required", "4"),
//and the test association is maintained
resource.TestCheckResourceAttr(alertRuleResourceName, "test_ids.#", "1"),
},
},
Expand Down

0 comments on commit cf60211

Please sign in to comment.