File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
staging/src/k8s.io/legacy-cloud-providers/gce Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
23
23
24
24
"github.com/GoogleCloudPlatform/k8s-cloud-provider/pkg/cloud"
25
25
compute "google.golang.org/api/compute/v1"
26
+ option "google.golang.org/api/option"
26
27
"k8s.io/client-go/tools/cache"
27
28
)
28
29
@@ -62,7 +63,10 @@ func fakeClusterID(clusterID string) ClusterID {
62
63
63
64
// NewFakeGCECloud constructs a fake GCE Cloud from the cluster values.
64
65
func NewFakeGCECloud (vals TestClusterValues ) * Cloud {
65
- service , _ := compute .NewService (context .Background ())
66
+ service , err := compute .NewService (context .Background (), option .WithoutAuthentication ())
67
+ if err != nil {
68
+ panic (err )
69
+ }
66
70
gce := & Cloud {
67
71
region : vals .Region ,
68
72
service : service ,
You can’t perform that action at this time.
0 commit comments