@@ -35,15 +35,15 @@ import (
35
35
csi "github.com/container-storage-interface/spec/lib/go/csi"
36
36
"sigs.k8s.io/gcp-compute-persistent-disk-csi-driver/pkg/common"
37
37
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"
39
38
)
40
39
41
40
const (
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"
47
47
)
48
48
49
49
var (
56
56
}
57
57
stdTopology = []* csi.Topology {
58
58
{
59
- Segments : map [string ]string {common .TopologyKeyZone : metadataservice . FakeZone },
59
+ Segments : map [string ]string {common .TopologyKeyZone : zone },
60
60
},
61
61
}
62
62
testVolumeID = fmt .Sprintf ("projects/%s/zones/%s/disks/%s" , project , zone , name )
@@ -435,7 +435,7 @@ func TestCreateVolumeArguments(t *testing.T) {
435
435
},
436
436
expVol : & csi.Volume {
437
437
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 ),
439
439
VolumeContext : nil ,
440
440
AccessibleTopology : []* csi.Topology {
441
441
{
@@ -478,7 +478,7 @@ func TestCreateVolumeArguments(t *testing.T) {
478
478
},
479
479
expVol : & csi.Volume {
480
480
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 ),
482
482
VolumeContext : nil ,
483
483
AccessibleTopology : []* csi.Topology {
484
484
{
@@ -594,10 +594,10 @@ func TestCreateVolumeArguments(t *testing.T) {
594
594
VolumeContext : nil ,
595
595
AccessibleTopology : []* csi.Topology {
596
596
{
597
- Segments : map [string ]string {common .TopologyKeyZone : metadataservice . FakeZone },
597
+ Segments : map [string ]string {common .TopologyKeyZone : zone },
598
598
},
599
599
{
600
- Segments : map [string ]string {common .TopologyKeyZone : "country-region-fakesecondzone" },
600
+ Segments : map [string ]string {common .TopologyKeyZone : secondZone },
601
601
},
602
602
},
603
603
},
0 commit comments