Chore: Remove bus from ngalert (#44465)
* pass notification service down to the notifiers * add ns to all notifiers * remove bus from ngalert notifiers * use smaller interfaces for notificationservice * attempt to fix the tests * remove unused struct field * simplify notification service mock * trying to resolve issues in the tests * make linter happy * make linter even happier * linter, you are annoying
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
package server
|
||||
|
||||
import "github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
import (
|
||||
"github.com/grafana/grafana/pkg/services/notifications"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
)
|
||||
|
||||
func ProvideTestEnv(server *Server, store *sqlstore.SQLStore) (*TestEnv, error) {
|
||||
return &TestEnv{server, store}, nil
|
||||
func ProvideTestEnv(server *Server, store *sqlstore.SQLStore, ns *notifications.NotificationServiceMock) (*TestEnv, error) {
|
||||
return &TestEnv{server, store, ns}, nil
|
||||
}
|
||||
|
||||
type TestEnv struct {
|
||||
Server *Server
|
||||
SQLStore *sqlstore.SQLStore
|
||||
Server *Server
|
||||
SQLStore *sqlstore.SQLStore
|
||||
NotificationService *notifications.NotificationServiceMock
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user