Extend also tests on config
This commit is contained in:
parent
2873d96b9f
commit
7390895514
@ -344,10 +344,11 @@ alerting:
|
|||||||
access-key: "1"
|
access-key: "1"
|
||||||
originator: "31619191918"
|
originator: "31619191918"
|
||||||
recipients: "31619191919"
|
recipients: "31619191919"
|
||||||
placeholders:
|
custom:
|
||||||
ALERT_TRIGGERED_OR_RESOLVED:
|
placeholders:
|
||||||
triggered: "partial_outage"
|
ALERT_TRIGGERED_OR_RESOLVED:
|
||||||
resolved: "operational"
|
triggered: "partial_outage"
|
||||||
|
resolved: "operational"
|
||||||
services:
|
services:
|
||||||
- name: twinnation
|
- name: twinnation
|
||||||
url: https://twinnation.org/health
|
url: https://twinnation.org/health
|
||||||
@ -400,6 +401,12 @@ services:
|
|||||||
if config.Alerting.Messagebird.Recipients != "31619191919" {
|
if config.Alerting.Messagebird.Recipients != "31619191919" {
|
||||||
t.Errorf("Messagebird to recipients should've been %s, but was %s", "31619191919", config.Alerting.Messagebird.Recipients)
|
t.Errorf("Messagebird to recipients should've been %s, but was %s", "31619191919", config.Alerting.Messagebird.Recipients)
|
||||||
}
|
}
|
||||||
|
if config.Alerting.Custom == nil {
|
||||||
|
t.Fatal("config.Alerting. Custom shouldn't have been nil")
|
||||||
|
}
|
||||||
|
if config.Alerting.Custom.Placeholders == nil {
|
||||||
|
t.Fatal("config.Alerting.Custom.Placeholders shouldn't have been nil")
|
||||||
|
}
|
||||||
if len(config.Services) != 1 {
|
if len(config.Services) != 1 {
|
||||||
t.Error("There should've been 1 service")
|
t.Error("There should've been 1 service")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user