@@ -139,7 +139,7 @@ func TestExtractAndDefaultParameters(t *testing.T) {
139139 ReplicationType : "none" ,
140140 DiskEncryptionKMSKey : "" ,
141141 Tags : map [string ]string {tagKeyCreatedForClaimName : "testPVCName" , tagKeyCreatedForClaimNamespace : "testPVCNamespace" , tagKeyCreatedForVolumeName : "testPVName" , tagKeyCreatedBy : "testDriver" },
142- Labels : map [string ]string {labelKeyCreatedForClaimName : "testPVCName" , labelKeyCreatedForClaimNamespace : "testPVCNamespace" , labelKeyCreatedForVolumeName : "testPVName" },
142+ Labels : map [string ]string {},
143143 },
144144 },
145145 {
@@ -178,30 +178,18 @@ func TestExtractAndDefaultParameters(t *testing.T) {
178178 Labels : map [string ]string {"key1" : "value1" , "label-1" : "value-a" , "label-2" : "label-value-2" },
179179 },
180180 },
181- {
182- name : "PVC labels" ,
183- parameters : map [string ]string {ParameterKeyPVCName : "testPVCName" , ParameterKeyPVCNamespace : "testPVCNamespace" , ParameterKeyPVName : "testPVName" },
184- labels : map [string ]string {},
185- expectParams : DiskParameters {
186- DiskType : "pd-standard" ,
187- ReplicationType : "none" ,
188- DiskEncryptionKMSKey : "" ,
189- Tags : map [string ]string {tagKeyCreatedForClaimName : "testPVCName" , tagKeyCreatedForClaimNamespace : "testPVCNamespace" , tagKeyCreatedForVolumeName : "testPVName" , tagKeyCreatedBy : "testDriver" },
190- Labels : map [string ]string {labelKeyCreatedForClaimName : "testPVCName" , labelKeyCreatedForClaimNamespace : "testPVCNamespace" , labelKeyCreatedForVolumeName : "testPVName" },
191- },
192- },
193- {
194- name : "PVC labels-override" ,
195- parameters : map [string ]string {ParameterKeyPVCName : "testPVCName" , ParameterKeyPVCNamespace : "testPVCNamespace" , ParameterKeyPVName : "testPVName" },
196- labels : map [string ]string {labelKeyCreatedForClaimNamespace : "test-override" },
197- expectParams : DiskParameters {
198- DiskType : "pd-standard" ,
199- ReplicationType : "none" ,
200- DiskEncryptionKMSKey : "" ,
201- Tags : map [string ]string {tagKeyCreatedForClaimName : "testPVCName" , tagKeyCreatedForClaimNamespace : "testPVCNamespace" , tagKeyCreatedForVolumeName : "testPVName" , tagKeyCreatedBy : "testDriver" },
202- Labels : map [string ]string {labelKeyCreatedForClaimName : "testPVCName" , labelKeyCreatedForClaimNamespace : "testPVCNamespace" , labelKeyCreatedForVolumeName : "testPVName" },
203- },
204- },
181+ {
182+ name : "PVC labels" ,
183+ parameters : map [string ]string {ParameterKeyPVCName : "testPVCName" , ParameterKeyPVCNamespace : "testPVCNamespace" , ParameterKeyPVName : "testPVName" },
184+ labels : map [string ]string {},
185+ expectParams : DiskParameters {
186+ DiskType : "pd-standard" ,
187+ ReplicationType : "none" ,
188+ DiskEncryptionKMSKey : "" ,
189+ Tags : map [string ]string {},
190+ Labels : map [string ]string {labelKeyCreatedForClaimName : "testPVCName" , labelKeyCreatedForClaimNamespace : "testPVCNamespace" , labelKeyCreatedForVolumeName : "testPVName" },
191+ },
192+ },
205193 }
206194
207195 for _ , tc := range tests {
0 commit comments