@@ -1376,49 +1376,6 @@ func TestCreateVolumeArguments(t *testing.T) {
1376
1376
},
1377
1377
enableDiskTopology : true ,
1378
1378
},
1379
- {
1380
- // Desired as the disk type label should match the `type` parameter,
1381
- // not the accessibility requirements.
1382
- name : "success: disk topology labels in accessibility requirements have no effect" ,
1383
- req : & csi.CreateVolumeRequest {
1384
- Name : "test-name" ,
1385
- CapacityRange : stdCapRange ,
1386
- VolumeCapabilities : stdVolCaps ,
1387
- Parameters : map [string ]string {"type" : stdDiskType },
1388
- AccessibilityRequirements : & csi.TopologyRequirement {
1389
- Requisite : []* csi.Topology {
1390
- {
1391
- Segments : map [string ]string {
1392
- common .TopologyKeyZone : "topology-zone3" ,
1393
- common .TopologyLabelKey ("another-disk-type" ): "true" ,
1394
- },
1395
- },
1396
- },
1397
- Preferred : []* csi.Topology {
1398
- {
1399
- Segments : map [string ]string {
1400
- common .TopologyKeyZone : "topology-zone3" ,
1401
- common .TopologyLabelKey ("another-disk-type" ): "true" ,
1402
- },
1403
- },
1404
- },
1405
- },
1406
- },
1407
- expVol : & csi.Volume {
1408
- CapacityBytes : common .GbToBytes (20 ),
1409
- VolumeId : fmt .Sprintf ("projects/%s/zones/topology-zone3/disks/%s" , project , name ),
1410
- VolumeContext : nil ,
1411
- AccessibleTopology : []* csi.Topology {
1412
- {
1413
- Segments : map [string ]string {
1414
- common .TopologyKeyZone : "topology-zone3" ,
1415
- common .TopologyLabelKey (stdDiskType ): "true" ,
1416
- },
1417
- },
1418
- },
1419
- },
1420
- enableDiskTopology : true ,
1421
- },
1422
1379
}
1423
1380
1424
1381
// Run test cases
@@ -3984,22 +3941,13 @@ func TestCreateVolumeRandomRequisiteTopology(t *testing.T) {
3984
3941
AccessibilityRequirements : & csi.TopologyRequirement {
3985
3942
Requisite : []* csi.Topology {
3986
3943
{
3987
- Segments : map [string ]string {
3988
- common .TopologyKeyZone : "topology-zone3" ,
3989
- common .TopologyLabelKey ("disk-1" ): "true" ,
3990
- },
3944
+ Segments : map [string ]string {common .TopologyKeyZone : "topology-zone3" },
3991
3945
},
3992
3946
{
3993
- Segments : map [string ]string {
3994
- common .TopologyKeyZone : "topology-zone1" ,
3995
- common .TopologyLabelKey ("disk-2" ): "true" ,
3996
- },
3947
+ Segments : map [string ]string {common .TopologyKeyZone : "topology-zone1" },
3997
3948
},
3998
3949
{
3999
- Segments : map [string ]string {
4000
- common .TopologyKeyZone : "topology-zone2" ,
4001
- common .TopologyLabelKey ("disk-3" ): "true" ,
4002
- },
3950
+ Segments : map [string ]string {common .TopologyKeyZone : "topology-zone2" },
4003
3951
},
4004
3952
},
4005
3953
},
@@ -4462,18 +4410,6 @@ func TestGetZonesFromTopology(t *testing.T) {
4462
4410
name : "success: no topology" ,
4463
4411
expZones : sets .NewString (),
4464
4412
},
4465
- {
4466
- name : "success: disk type label is ignored without causing an error" ,
4467
- topology : []* csi.Topology {
4468
- {
4469
- Segments : map [string ]string {
4470
- common .TopologyKeyZone : "test-zone" ,
4471
- common .TopologyLabelKey ("disk-type" ): "true" ,
4472
- },
4473
- },
4474
- },
4475
- expZones : sets .NewString ([]string {"test-zone" }... ),
4476
- },
4477
4413
}
4478
4414
for _ , tc := range testCases {
4479
4415
t .Logf ("test case: %s" , tc .name )
0 commit comments