@@ -1356,12 +1356,14 @@ func TestCreateVolume(t *testing.T) {
13561356 name : "success with cluster-id" ,
13571357 testFunc : func (t * testing.T ) {
13581358 const (
1359- volumeName = "random-vol-name"
1360- clusterID = "test-cluster-id"
1361- expectedOwnerTag = "kubernetes.io/cluster/test-cluster-id"
1362- expectedOwnerTagValue = "owned"
1363- expectedNameTag = "Name"
1364- expectedNameTagValue = "test-cluster-id-dynamic-random-vol-name"
1359+ volumeName = "random-vol-name"
1360+ clusterID = "test-cluster-id"
1361+ expectedOwnerTag = "kubernetes.io/cluster/test-cluster-id"
1362+ expectedOwnerTagValue = "owned"
1363+ expectedNameTag = "Name"
1364+ expectedNameTagValue = "test-cluster-id-dynamic-random-vol-name"
1365+ expectedKubernetesClusterTag = "KubernetesCluster"
1366+ expectedKubernetesClusterTagValue = "test-cluster-id"
13651367 )
13661368 req := & csi.CreateVolumeRequest {
13671369 Name : volumeName ,
@@ -1381,10 +1383,11 @@ func TestCreateVolume(t *testing.T) {
13811383 diskOptions := & cloud.DiskOptions {
13821384 CapacityBytes : stdVolSize ,
13831385 Tags : map [string ]string {
1384- cloud .VolumeNameTagKey : volumeName ,
1385- cloud .AwsEbsDriverTagKey : "true" ,
1386- expectedOwnerTag : expectedOwnerTagValue ,
1387- expectedNameTag : expectedNameTagValue ,
1386+ cloud .VolumeNameTagKey : volumeName ,
1387+ cloud .AwsEbsDriverTagKey : "true" ,
1388+ expectedOwnerTag : expectedOwnerTagValue ,
1389+ expectedNameTag : expectedNameTagValue ,
1390+ expectedKubernetesClusterTag : expectedKubernetesClusterTagValue ,
13881391 },
13891392 }
13901393
@@ -1418,7 +1421,6 @@ func TestCreateVolume(t *testing.T) {
14181421 testFunc : func (t * testing.T ) {
14191422 const (
14201423 volumeName = "random-vol-name"
1421- clusterID = "test-cluster-id"
14221424 expectedPVCNameTag = "kubernetes.io/created-for/pvc/name"
14231425 expectedPVCNamespaceTag = "kubernetes.io/created-for/pvc/namespace"
14241426 expectedPVNameTag = "kubernetes.io/created-for/pv/name"
0 commit comments