Advisor: App installer setup (#113525)

This commit is contained in:
Andres Martinez Gotor
2025-11-12 15:32:21 +01:00
committed by GitHub
parent 6c512dabdc
commit d83c35fd71
25 changed files with 125 additions and 487 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/registry/apps/advisor"
"github.com/grafana/grafana/pkg/registry/apps/alerting/notifications"
"github.com/grafana/grafana/pkg/registry/apps/alerting/rules"
"github.com/grafana/grafana/pkg/registry/apps/annotation"
@@ -23,7 +24,7 @@ func TestProvideAppInstallers_Table(t *testing.T) {
notificationsAppInstaller := &notifications.AlertingNotificationsAppInstaller{}
annotationAppInstaller := &annotation.AnnotationAppInstaller{}
exampleAppInstaller := &example.ExampleAppInstaller{}
advisorAppInstaller := &advisor.AdvisorAppInstaller{}
tests := []struct {
name string
flags []any
@@ -39,7 +40,7 @@ func TestProvideAppInstallers_Table(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
features := featuremgmt.WithFeatures(tt.flags...)
got := ProvideAppInstallers(features, playlistInstaller, pluginsInstaller, nil, tt.rulesInst, correlationsAppInstaller, notificationsAppInstaller, nil, annotationAppInstaller, exampleAppInstaller)
got := ProvideAppInstallers(features, playlistInstaller, pluginsInstaller, nil, tt.rulesInst, correlationsAppInstaller, notificationsAppInstaller, nil, annotationAppInstaller, exampleAppInstaller, advisorAppInstaller)
if tt.expectRulesApp {
require.Contains(t, got, tt.rulesInst)
} else {