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:
Oskar CarlandTwiN authored and GitHub committed 2023-07-02 23:10:16 -04:00
1 parent ecda4a9987
commit 5eebe6d9cc
3 files changed
+22 -1

No files matched your search

+10
View File
@@ -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},