Fix #146: Alerting causes panic with some providers

This commit is contained in:
TwinProduction committed 2021-07-29 18:13:37 -04:00
1 parent 07b1a2eafb
commit cdbc075439
5 files changed
+22 -9

No files matched your search

+9 -3
View File
@@ -6,12 +6,18 @@ import (
)
func TestGetHTTPClient(t *testing.T) {
GetHTTPClient(&Config{
cfg := &Config{
Insecure: false,
IgnoreRedirect: false,
Timeout: 0,
httpClient: nil,
})
}
cfg.ValidateAndSetDefaults()
if GetHTTPClient(cfg) == nil {
t.Error("expected client to not be nil")
}
if GetHTTPClient(nil) == nil {
t.Error("expected client to not be nil")
}
}
func TestPing(t *testing.T) {