@@ -351,7 +351,7 @@ def test_extract_comma_separated_string(self):
351
351
validators .extract_comma_separated_string (s12 , extract_kv = True )
352
352
353
353
s13 = "WindowsContainerRuntime=containerd,AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview"
354
- t13 = validators .extract_comma_separated_string (s13 , enable_strip = True , extract_kv = True , default_value = {},)
354
+ t13 = validators .extract_comma_separated_string (s13 , enable_strip = True , extract_kv = True , default_value = {}, allow_appending_values_to_same_key = True )
355
355
g13 = {"WindowsContainerRuntime" : "containerd" , "AKSHTTPCustomFeatures" : "Microsoft.ContainerService/CustomNodeConfigPreview" }
356
356
self .assertEqual (t13 , g13 )
357
357
@@ -360,6 +360,16 @@ def test_extract_comma_separated_string(self):
360
360
g14 = {"" : "" }
361
361
self .assertEqual (t14 , g14 )
362
362
363
+ s15 = "WindowsContainerRuntime=containerd,AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSTestFeaturePreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSExampleFeaturePreview"
364
+ t15 = validators .extract_comma_separated_string (s15 , enable_strip = True , extract_kv = True , default_value = {},)
365
+ g15 = {"WindowsContainerRuntime" : "containerd" , "AKSHTTPCustomFeatures" : "Microsoft.ContainerService/AKSExampleFeaturePreview" }
366
+ self .assertEqual (t15 , g15 )
367
+
368
+ s16 = "WindowsContainerRuntime=containerd,AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSTestFeaturePreview,AKSHTTPCustomFeatures=Microsoft.ContainerService/AKSExampleFeaturePreview"
369
+ t16 = validators .extract_comma_separated_string (s16 , enable_strip = True , extract_kv = True , default_value = {}, allow_appending_values_to_same_key = True )
370
+ g16 = {"WindowsContainerRuntime" : "containerd" , "AKSHTTPCustomFeatures" : "Microsoft.ContainerService/AKSTestFeaturePreview,Microsoft.ContainerService/AKSExampleFeaturePreview" }
371
+ self .assertEqual (t16 , g16 )
372
+
363
373
364
374
class CredentialFormatNamespace :
365
375
def __init__ (self , credential_format ):
@@ -381,3 +391,7 @@ def test_valid_format(self):
381
391
namespace = CredentialFormatNamespace (credential_format )
382
392
383
393
validators .validate_credential_format (namespace )
394
+
395
+
396
+ if __name__ == "__main__" :
397
+ unittest .main ()
0 commit comments