Alerting: Add two missing tests which cover missing URLs for Loki state history (#70460)
Add two missing tests which cover individual missing URLs
This commit is contained in:
@@ -57,6 +57,20 @@ func TestLokiConfig(t *testing.T) {
|
||||
expRead: "http://read.url.com",
|
||||
expWrite: "http://url.com",
|
||||
},
|
||||
{
|
||||
name: "missing read",
|
||||
in: setting.UnifiedAlertingStateHistorySettings{
|
||||
LokiWriteURL: "http://url.com",
|
||||
},
|
||||
expErr: "either read path URL or remote",
|
||||
},
|
||||
{
|
||||
name: "missing write",
|
||||
in: setting.UnifiedAlertingStateHistorySettings{
|
||||
LokiReadURL: "http://url.com",
|
||||
},
|
||||
expErr: "either write path URL or remote",
|
||||
},
|
||||
{
|
||||
name: "invalid",
|
||||
in: setting.UnifiedAlertingStateHistorySettings{
|
||||
|
||||
Reference in New Issue
Block a user