-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Threshold alerts #49
Threshold alerts #49
Conversation
louism517
commented
Jul 2, 2019
- adds support for Threshold alerts (addresses Support for multi-threshold alerts #42)
}) | ||
} | ||
|
||
func TestResourceAlert_validateAlertConditions(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this test to also check for info, warn or severe
wavefront/resource_alert_test.go
Outdated
tmpTargetID := "" | ||
|
||
if os.Getenv("TF_ACC") == "true" { | ||
tmpTarget, err = createTarget() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to also create the tmp target within testAccCheckWavefrontAlert_threshold ? Then we don't need to worry about this check, creating it and tidying it up.
Thinking it the targetID can be retrieved from state within testAccCheckWavefrontThresholdAlertAttributes()
ok := false | ||
for _, level := range []string{"severe", "warn", "info", "smoke"} { | ||
if key == level { | ||
ok = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should break
here when setting ok to true