mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-24 17:04:42 +01:00
test(alerting): Fix tests following change to defaults
This commit is contained in:
parent
5f8e62dad0
commit
1a708ebca2
@ -14,9 +14,9 @@ func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "invalid-url",
|
||||
provider: AlertProvider{URL: "", Topic: "example", Priority: 1},
|
||||
expected: false,
|
||||
name: "no-url-should-use-default-value",
|
||||
provider: AlertProvider{Topic: "example", Priority: 1},
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "invalid-topic",
|
||||
@ -30,9 +30,14 @@ func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "invalid-priority-too-low",
|
||||
provider: AlertProvider{URL: "https://ntfy.sh", Topic: "example", Priority: 0},
|
||||
provider: AlertProvider{URL: "https://ntfy.sh", Topic: "example", Priority: -1},
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "no-priority-should-use-default-value",
|
||||
provider: AlertProvider{URL: "https://ntfy.sh", Topic: "example"},
|
||||
expected: true,
|
||||
},
|
||||
}
|
||||
for _, scenario := range scenarios {
|
||||
t.Run(scenario.name, func(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user