ResourceClient: Exercise resource client in k8s apis tests (#93473)

This commit is contained in:
Ryan McKinley
2024-09-19 17:16:48 +03:00
committed by GitHub
parent 63195664f4
commit 542105b680
9 changed files with 68 additions and 28 deletions
+5
View File
@@ -2,6 +2,7 @@ package unified
import (
"context"
"fmt"
"path/filepath"
infraDB "github.com/grafana/grafana/pkg/infra/db"
@@ -59,6 +60,10 @@ func ProvideUnifiedStorageClient(
return resource.NewLocalResourceClient(server), nil
case options.StorageTypeUnifiedGrpc:
if opts.Address == "" {
return nil, fmt.Errorf("expecting address for storage_type: %s", opts.StorageType)
}
// Create a connection to the gRPC server
conn, err := grpc.NewClient(opts.Address,
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),