Skip to content
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

Merged
merged 5 commits into from
Jul 3, 2019
Merged

Threshold alerts #49

merged 5 commits into from
Jul 3, 2019

Conversation

louism517
Copy link
Contributor

@louism517 louism517 requested a review from nathmclean July 2, 2019 15:40
wavefront/resource_alert.go Show resolved Hide resolved
wavefront/resource_alert.go Show resolved Hide resolved
})
}

func TestResourceAlert_validateAlertConditions(t *testing.T) {
Copy link
Collaborator

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

tmpTargetID := ""

if os.Getenv("TF_ACC") == "true" {
tmpTarget, err = createTarget()
Copy link
Collaborator

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
Copy link
Collaborator

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

@louism517 louism517 merged commit 98ccff1 into master Jul 3, 2019
@louism517 louism517 deleted the threshold_alerts branch July 3, 2019 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants