@@ -69,16 +69,16 @@ def test_ams_streaming_endpoint_create_with_akamai(self, storage_account_for_cre
69
69
'scaleUnits' : 4 ,
70
70
'tags' : 'foo=bar' ,
71
71
'ips' : '1.1.1.1 2.2.2.2' ,
72
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
73
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' )),
72
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
73
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' )),
74
74
'identifier' : 'id1' ,
75
75
'expiration' : '2030-12-31T16:00:00-08:00' ,
76
76
'base64Key' : 'dGVzdGlkMQ=='
77
77
})
78
78
79
79
self .cmd ('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}' )
80
80
81
- self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --ips {ips} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' , checks = [
81
+ self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --ips {ips} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' , checks = [
82
82
self .check ('name' , '{streamingEndpointName}' ),
83
83
self .check ('resourceGroup' , '{rg}' ),
84
84
self .check ('location' , 'North Europe' ),
@@ -124,14 +124,14 @@ def test_ams_streaming_endpoint_update(self, storage_account_for_create):
124
124
'maxCacheAge' : 11 ,
125
125
'scaleUnits' : 5 ,
126
126
'tags' : 'foo=bar' ,
127
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
128
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' )),
127
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
128
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' )),
129
129
'ip' : '4.4.4.4'
130
130
})
131
131
132
132
self .cmd ('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}' )
133
133
134
- self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' , checks = [
134
+ self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' , checks = [
135
135
self .check ('name' , '{streamingEndpointName}' ),
136
136
self .check ('resourceGroup' , '{rg}' ),
137
137
self .check ('location' , 'Australia East' ),
@@ -155,12 +155,12 @@ def test_ams_streaming_endpoint_update(self, storage_account_for_create):
155
155
'description' : 'test streaming description2' ,
156
156
'maxCacheAge' : 9 ,
157
157
'tags' : 'foo2=bar2 foo3=bar3' ,
158
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
159
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' )),
158
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
159
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' )),
160
160
'ips' : '1.1.1.1 2.2.2.2 192.168.0.0/28'
161
161
})
162
162
163
- self .cmd ('az ams streaming-endpoint update -g {rg} -a {amsname} -n {streamingEndpointName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --tags {tags} --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' , checks = [
163
+ self .cmd ('az ams streaming-endpoint update -g {rg} -a {amsname} -n {streamingEndpointName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --tags {tags} --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' , checks = [
164
164
self .check ('name' , '{streamingEndpointName}' ),
165
165
self .check ('cdnProvider' , '{cdnProvider}' ),
166
166
self .check ('cdnProfile' , '{cdnProfile}' ),
@@ -201,13 +201,13 @@ def test_ams_streaming_endpoint_create(self, storage_account_for_create):
201
201
'maxCacheAge' : 11 ,
202
202
'scaleUnits' : 6 ,
203
203
'tags' : 'foo=bar' ,
204
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
205
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
204
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
205
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
206
206
})
207
207
208
208
self .cmd ('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}' )
209
209
210
- self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' , checks = [
210
+ self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' , checks = [
211
211
self .check ('name' , '{streamingEndpointName}' ),
212
212
self .check ('resourceGroup' , '{rg}' ),
213
213
self .check ('location' , 'Canada Central' ),
@@ -240,13 +240,13 @@ def test_ams_streaming_endpoint_show(self, storage_account_for_show):
240
240
'maxCacheAge' : 11 ,
241
241
'scaleUnits' : 7 ,
242
242
'tags' : 'foo=bar' ,
243
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
244
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
243
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
244
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
245
245
})
246
246
247
247
self .cmd ('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}' )
248
248
249
- self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' )
249
+ self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' )
250
250
251
251
self .cmd ('az ams streaming-endpoint show -g {rg} -a {amsname} -n {streamingEndpointName}' , checks = [
252
252
self .check ('name' , '{streamingEndpointName}' ),
@@ -288,13 +288,13 @@ def test_ams_streaming_endpoint_delete(self, storage_account_for_delete):
288
288
'maxCacheAge' : 11 ,
289
289
'scaleUnits' : 8 ,
290
290
'tags' : 'foo=bar' ,
291
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
292
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
291
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
292
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
293
293
})
294
294
295
295
self .cmd ('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}' )
296
296
297
- self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName1} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' )
297
+ self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName1} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' )
298
298
299
299
self .cmd ('az ams streaming-endpoint list -g {rg} -a {amsname}' , checks = [
300
300
self .check ('length(@)' , 2 )
@@ -325,13 +325,13 @@ def test_ams_streaming_endpoint_scale(self, storage_account_for_scale):
325
325
'scaleUnits' : 9 ,
326
326
'scaleUnits2' : 10 ,
327
327
'tags' : 'foo=bar' ,
328
- 'clientAccessPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
329
- 'crossDomainPolicy' : '@' + self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
328
+ 'clientAccessPolicy' : self ._normalize_filename (_get_test_data_file ('clientAccessPolicy.xml' )),
329
+ 'crossDomainPolicy' : self ._normalize_filename (_get_test_data_file ('crossDomainPolicy.xml' ))
330
330
})
331
331
332
332
self .cmd ('az ams account create -n {amsname} -g {rg} --storage-account {storageAccount} -l {location}' )
333
333
334
- self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy "{clientAccessPolicy}" --cross-domain-policy "{crossDomainPolicy}"' , checks = [
334
+ self .cmd ('az ams streaming-endpoint create -g {rg} -a {amsname} -n {streamingEndpointName} --availability-set-name {availabilitySetName} --cdn-provider {cdnProvider} --cdn-profile {cdnProfile} --description "{description}" --max-cache-age {maxCacheAge} --scale-units {scaleUnits} --tags "{tags}" --client-access-policy @ "{clientAccessPolicy}" --cross-domain-policy @ "{crossDomainPolicy}"' , checks = [
335
335
self .check ('scaleUnits' , '{scaleUnits}' )
336
336
])
337
337
@@ -468,4 +468,5 @@ def test_ams_streaming_endpoint_list(self, storage_account_for_create):
468
468
# Helper functions
469
469
470
470
def _normalize_filename (cmd , string ):
471
- return '"' + string .replace ('\\ ' , '/' ) + '"'
471
+ import platform
472
+ return '"' + string .replace ('\\ ' , '/' ) + '"' if platform .system () != 'Windows' else string
0 commit comments