Skip to content

Commit 7bda0c0

Browse files
authored
Merge pull request #625 from yussufsh/main
Fix for grpc NewClient failure while running IT
2 parents e284433 + e7e2eb3 commit 7bda0c0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/util/util_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ func TestParseEndpoint(t *testing.T) {
6363
expAddr string
6464
expErr error
6565
}{
66+
{
67+
name: "valid tcp endpoint",
68+
endpoint: "tcp://localhost:10000",
69+
expScheme: "tcp",
70+
expAddr: "localhost:10000",
71+
},
6672
{
6773
name: "valid unix endpoint 1",
6874
endpoint: "unix:///csi/csi.sock",

tests/it/utils.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
. "github.com/onsi/gomega"
2929
"google.golang.org/grpc"
3030
"google.golang.org/grpc/credentials/insecure"
31+
"google.golang.org/grpc/resolver"
3132
"k8s.io/apimachinery/pkg/util/wait"
3233
"k8s.io/klog/v2"
3334
"sigs.k8s.io/ibm-powervs-block-csi-driver/pkg/driver"
@@ -106,6 +107,7 @@ func verifyRequiredEnvVars(runRemotely bool) {
106107

107108
// newCSIClient creates as CSI client
108109
func newCSIClient() (*CSIClient, error) {
110+
resolver.SetDefaultScheme("passthrough")
109111
opts := []grpc.DialOption{
110112
grpc.WithTransportCredentials(insecure.NewCredentials()),
111113
// grpc.WithBlock(),

0 commit comments

Comments
 (0)