feat(alerting): Add token authorization for ntfy (#512)
* feat(alerting): Add token authorization for ntfy * feat(alerting): Fix suggestions for ntfy auth --------- Co-authored-by: TwiN <twin@linux.com>
This commit is contained in:
1 parent
ecda4a9987
commit
5eebe6d9cc
3 files changed
+22
-1
No files matched your search
@@ -24,6 +24,16 @@ func TestAlertDefaultProvider_IsValid(t *testing.T) {
|
||||
provider: AlertProvider{Topic: "example", Priority: 1},
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "valid-with-token",
|
||||
provider: AlertProvider{Topic: "example", Priority: 1, Token: "tk_faketoken"},
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "invalid-token",
|
||||
provider: AlertProvider{Topic: "example", Priority: 1, Token: "xx_faketoken"},
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "invalid-topic",
|
||||
provider: AlertProvider{URL: "https://ntfy.sh", Topic: "", Priority: 1},
|
||||
|
||||
Reference in new issue
Block a user