-
Notifications
You must be signed in to change notification settings - Fork 79
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
testutil/compose: add unit tests #630
Conversation
// a channel on which the received webhooks will be sent. | ||
func startAlertCollector(ctx context.Context, port int) (chan []byte, error) { | ||
// a channel on which the received alert titles will be sent. | ||
func startAlertCollector(ctx context.Context, port int) (chan string, error) { |
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.
this is going to be refactored away in the next sprint. Move from push Grafana alerts to pull prometheus alerts for the unit tests.
Codecov Report
@@ Coverage Diff @@
## main #630 +/- ##
==========================================
- Coverage 56.76% 55.32% -1.45%
==========================================
Files 96 98 +2
Lines 9130 9430 +300
==========================================
+ Hits 5183 5217 +34
- Misses 3203 3468 +265
- Partials 744 745 +1
Continue to review full report at Codecov.
|
//go:generate go test . -run=TestSmoke -integration -v | ||
var integration = flag.Bool("integration", false, "Enable docker based integration test") | ||
|
||
func TestSmoke(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.
These are the unit tests
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.
Unit tests
of smoke tests
🙃
@@ -1,6 +1,6 @@ | |||
global: | |||
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | |||
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. | |||
scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute. |
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.
scrape faster for more responsive alerts
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.
LGTM🚀
Adds unit tests for different cluster configurations.
category: test
ticket: #609