-
Notifications
You must be signed in to change notification settings - Fork 0
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
Load active incidents gracefully #129
Conversation
eef0004
to
0bc598c
Compare
0bc598c
to
93f985a
Compare
93f985a
to
2b68ec4
Compare
7924054
to
c05571c
Compare
c05571c
to
2c72b11
Compare
ce1947e
to
82c7d48
Compare
82c7d48
to
1eb8a4c
Compare
f46b60e
to
5e25990
Compare
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.
Actually, my just written unit tests were able to catch a serious bug 🐞
Well, I'd say they already paid off 😅
require.NoError(t, err, "database config validation should not fail") | ||
} | ||
|
||
db, err := c.Open(logging.NewLogger(zap.NewNop().Sugar(), time.Hour)) |
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.
zap
allows to create a logger for tests, have you considered using it? https://pkg.go.dev/go.uber.org/zap/zaptest#NewLogger
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.
Do you really want Icinga Notifications to depend on the zaptest
package?
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.
NVM! It's already there as part of zap
main package.
9c0e6e1
to
c5b127b
Compare
c5b127b
to
370b303
Compare
Co-Authored-By: Julian Brost <[email protected]>
9d378db
to
2108a18
Compare
Since we now utilise |
2108a18
to
8c14488
Compare
resolves #119