Skip to content

Commit d5ec522

Browse files
committed
remove invalid compute endpoint testcase as updated logic causes crash on invalid endpoint
1 parent 7f3ed13 commit d5ec522

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

pkg/gce-cloud-provider/compute/gce.go

-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ func getComputeVersion(ctx context.Context, tokenSource oauth2.TokenSource, comp
229229
_, err = url.ParseRequestURI(endpoint)
230230
if err != nil {
231231
klog.Fatalf("Error parsing compute endpoint %s", endpoint)
232-
return nil, err
233232
}
234233
computeOpts = append(computeOpts, option.WithEndpoint(endpoint))
235234
}

test/e2e/tests/single_zone_e2e_test.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ var _ = Describe("GCE PD CSI Driver", func() {
12801280
}()
12811281
})
12821282

1283-
It("Should pass/fail if valid/invalid compute endpoint is passed in", func() {
1283+
It("Should pass if valid compute endpoint is passed in", func() {
12841284
// gets instance set up w/o compute-endpoint set from test setup
12851285
_, err := getRandomTestContext().Client.ListVolumes()
12861286
Expect(err).To(BeNil(), "no error expected when passed valid compute url")
@@ -1295,14 +1295,6 @@ var _ = Describe("GCE PD CSI Driver", func() {
12951295

12961296
klog.Infof("Creating new driver and client for node %s\n", i.GetName())
12971297

1298-
// Create new driver and client w/ invalid endpoint
1299-
computeEndpoint := "invalid-string"
1300-
tcInvalid, err := testutils.GCEClientAndDriverSetup(i, computeEndpoint)
1301-
if tcInvalid != nil {
1302-
klog.Fatalf("Driver setup with incorrect compute %v: %v", i.GetName(), computeEndpoint)
1303-
}
1304-
Expect(err.Error()).To(ContainSubstring("failed start driver"), "expected error when passed invalid compute url")
1305-
13061298
// Create new driver and client w/ valid, passed-in endpoint
13071299
tcValid, err := testutils.GCEClientAndDriverSetup(i, "https://compute.googleapis.com")
13081300
if err != nil {

0 commit comments

Comments
 (0)