ResourceClient: Exercise resource client in k8s apis tests (#93473)
This commit is contained in:
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user