Testing: Integration tests for unified-grpc start a local gRPC server (#93201)

This commit is contained in:
Ryan McKinley
2024-09-11 11:50:14 +03:00
committed by GitHub
parent 91c3e3478a
commit 7efadb0a00
5 changed files with 47 additions and 12 deletions
+4 -3
View File
@@ -16,6 +16,7 @@ import (
playlistv0alpha1 "github.com/grafana/grafana/pkg/apis/playlist/v0alpha1"
grafanarest "github.com/grafana/grafana/pkg/apiserver/rest"
"github.com/grafana/grafana/pkg/services/apiserver/options"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/services/playlist"
"github.com/grafana/grafana/pkg/setting"
@@ -156,7 +157,7 @@ func TestIntegrationPlaylist(t *testing.T) {
doPlaylistTests(t, apis.NewK8sTestHelper(t, testinfra.GrafanaOpts{
AppModeProduction: false, // required for unified storage
DisableAnonymous: true,
APIServerStorageType: "unified", // use the entity api tables
APIServerStorageType: options.StorageTypeUnified, // use the entity api tables
EnableFeatureToggles: []string{
featuremgmt.FlagKubernetesPlaylists, // Required so that legacy calls are also written
},
@@ -170,9 +171,9 @@ func TestIntegrationPlaylist(t *testing.T) {
t.Run("with dual write (unified storage, mode 1)", func(t *testing.T) {
doPlaylistTests(t, apis.NewK8sTestHelper(t, testinfra.GrafanaOpts{
AppModeProduction: false, // required for unified storage
AppModeProduction: false,
DisableAnonymous: true,
APIServerStorageType: "unified", // use the entity api tables
APIServerStorageType: options.StorageTypeUnifiedGrpc, // start a real grpc server
EnableFeatureToggles: []string{},
}))
})