mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(ci): improve test coverage
This commit is contained in:
committed by
Łukasz Mierzwa
parent
d0fdf767ea
commit
7f33af0bf5
@@ -193,3 +193,30 @@ func TestAlertmanagerPullWithInvalidURI(t *testing.T) {
|
||||
t.Error("am.Pull(invalid uri) didn't return any error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAlertmanagerPullAlertsWithInvalidVersion(t *testing.T) {
|
||||
log.SetLevel(log.PanicLevel)
|
||||
am, _ := NewAlertmanager("cluster", "test", "http://localhost")
|
||||
err := am.pullAlerts("0.0.1")
|
||||
if err == nil {
|
||||
t.Error("am.pullAlerts(invalid version) didn't return any error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAlertmanagerPullSilencesWithInvalidVersion(t *testing.T) {
|
||||
log.SetLevel(log.PanicLevel)
|
||||
am, _ := NewAlertmanager("cluster", "test", "http://localhost")
|
||||
err := am.pullSilences("0.0.1")
|
||||
if err == nil {
|
||||
t.Error("am.pullSilences(invalid version) didn't return any error")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAlertmanagerFetchStatusWithInvalidVersion(t *testing.T) {
|
||||
log.SetLevel(log.PanicLevel)
|
||||
am, _ := NewAlertmanager("cluster", "test", "http://localhost")
|
||||
_, err := am.fetchStatus("0.0.1")
|
||||
if err == nil {
|
||||
t.Error("am.fetchStatus(invalid version) didn't return any error")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user