-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix: default alert rule not being read #151
fix: default alert rule not being read #151
Conversation
7abcbc3
@@ -25,3 +25,13 @@ jobs: | |||
run: | | |||
git diff --compact-summary --exit-code || \ | |||
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate' command and commit."; exit 1) | |||
|
|||
unit: |
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.
we had some UTs but we were not running them 😄
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.
@@ -53,68 +53,6 @@ func expandAlertRules(alertRules *[]thousandeyes.AlertRule) *[]thousandeyes.Aler | |||
return ret | |||
} | |||
|
|||
func expandBGPMonitors(v interface{}) thousandeyes.BGPMonitors { |
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.
ununsed methods
output, err = FixReadValues(testsInput, "tests") | ||
if err != nil { | ||
t.Errorf("tests input returned error: %s", err.Error()) | ||
} | ||
if output != nil { | ||
if reflect.DeepEqual(output, testsTarget) != 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.
Just fixing this, nothing changed as part of this PR. This was breaking for a long time already. For the tests
we do nothing, so the output should be the same as the input
This fixes #111 .
It seems to conflict with the fix that was done here for #73. However, was trying out the scenarios from #73 locally:
alerts_enabled
set totrue
and without specifying any alert rulealerts_enabled
set tofalse
and with 2 alert rules, one of them being a default alert ruleand both Terraform plan/apply, as well as subsequent terraform plans, ran ok (and the subsequent terraform plans showed no changes).
@raul-te not sure if you have any objection or know anything else that I should further test before merging this. Because it does seems that filtering out the Default Alert Rules is no longer needed...
NOTE: We do need some tests for this repo though, as we should have more visibility when fixing something do make sure that we don't introduce any regression.