diff --git a/pkg/services/ngalert/state/historian/loki_http_test.go b/pkg/services/ngalert/state/historian/loki_http_test.go index 02ebe4cf741..0f1c6fe7f90 100644 --- a/pkg/services/ngalert/state/historian/loki_http_test.go +++ b/pkg/services/ngalert/state/historian/loki_http_test.go @@ -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{