@@ -35,15 +35,15 @@ import (
3535 csi "github.com/container-storage-interface/spec/lib/go/csi"
3636 "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
3737 gce "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/compute"
38- metadataservice "sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/gce-cloud-provider/metadata"
3938)
4039
4140const (
42- project = metadataservice .FakeProject
43- zone = metadataservice .FakeZone
44- node = "test-node"
45- driver = "test-driver"
46- name = "test-name"
41+ project = "test-project"
42+ zone = "country-region-zone"
43+ secondZone = "country-region-fakesecondzone"
44+ node = "test-node"
45+ driver = "test-driver"
46+ name = "test-name"
4747)
4848
4949var (
5656 }
5757 stdTopology = []* csi.Topology {
5858 {
59- Segments : map [string ]string {common .TopologyKeyZone : metadataservice . FakeZone },
59+ Segments : map [string ]string {common .TopologyKeyZone : zone },
6060 },
6161 }
6262 testVolumeID = fmt .Sprintf ("projects/%s/zones/%s/disks/%s" , project , zone , name )
@@ -435,7 +435,7 @@ func TestCreateVolumeArguments(t *testing.T) {
435435 },
436436 expVol : & csi.Volume {
437437 CapacityBytes : common .GbToBytes (20 ),
438- VolumeId : fmt .Sprintf ("projects/%s/zones/topology-zone/disks/%s" , metadataservice . FakeProject , name ),
438+ VolumeId : fmt .Sprintf ("projects/%s/zones/topology-zone/disks/%s" , project , name ),
439439 VolumeContext : nil ,
440440 AccessibleTopology : []* csi.Topology {
441441 {
@@ -478,7 +478,7 @@ func TestCreateVolumeArguments(t *testing.T) {
478478 },
479479 expVol : & csi.Volume {
480480 CapacityBytes : common .GbToBytes (20 ),
481- VolumeId : fmt .Sprintf ("projects/%s/zones/topology-zone2/disks/%s" , metadataservice . FakeProject , name ),
481+ VolumeId : fmt .Sprintf ("projects/%s/zones/topology-zone2/disks/%s" , project , name ),
482482 VolumeContext : nil ,
483483 AccessibleTopology : []* csi.Topology {
484484 {
@@ -594,10 +594,10 @@ func TestCreateVolumeArguments(t *testing.T) {
594594 VolumeContext : nil ,
595595 AccessibleTopology : []* csi.Topology {
596596 {
597- Segments : map [string ]string {common .TopologyKeyZone : metadataservice . FakeZone },
597+ Segments : map [string ]string {common .TopologyKeyZone : zone },
598598 },
599599 {
600- Segments : map [string ]string {common .TopologyKeyZone : "country-region-fakesecondzone" },
600+ Segments : map [string ]string {common .TopologyKeyZone : secondZone },
601601 },
602602 },
603603 },
0 commit comments