@@ -164,7 +164,7 @@ function Api-ImportExportWadlTest {
164
164
165
165
$context = New-AzureRmApiManagementContext - ResourceGroupName $resourceGroupName - ServiceName $serviceName
166
166
167
- $wadlPath = " . /Resources/WADLYahoo.xml"
167
+ $wadlPath = " $TestOutputRoot /Resources/WADLYahoo.xml"
168
168
$path = " wadlapi"
169
169
$wadlApiId = getAssetName
170
170
@@ -196,7 +196,7 @@ function Api-ImportExportSwaggerTest {
196
196
197
197
$context = New-AzureRmApiManagementContext - ResourceGroupName $resourceGroupName - ServiceName $serviceName
198
198
199
- $swaggerPath = " . /Resources/SwaggerPetStoreV2.json"
199
+ $swaggerPath = " $TestOutputRoot /Resources/SwaggerPetStoreV2.json"
200
200
$swaggerUrl = " http://petstore.swagger.io/v2/swagger.json"
201
201
$path1 = " swaggerapifromFile"
202
202
$path2 = " swaggerapifromUrl"
@@ -241,7 +241,7 @@ function Api-ImportExportWsdlTest {
241
241
242
242
$context = New-AzureRmApiManagementContext - ResourceGroupName $resourceGroupName - ServiceName $serviceName
243
243
244
- $wsdlPath1 = " . /Resources/Weather.wsdl"
244
+ $wsdlPath1 = " $TestOutputRoot /Resources/Weather.wsdl"
245
245
$wsdlUrl = " http://www.webservicex.net/stockquote.asmx?WSDL"
246
246
$path1 = " soapapifromFile"
247
247
$path2 = " soapapifromUrl"
@@ -295,7 +295,7 @@ function Api-ImportWsdlToCreateSoapToRestApi {
295
295
296
296
$context = New-AzureRmApiManagementContext - ResourceGroupName $resourceGroupName - ServiceName $serviceName
297
297
298
- $wsdlPath1 = " . /Resources/Weather.wsdl"
298
+ $wsdlPath1 = " $TestOutputRoot /Resources/Weather.wsdl"
299
299
$path1 = " soapToRestApi"
300
300
$wsdlApiId1 = getAssetName
301
301
$wsdlServiceName1 = " Weather" # from file Weather.wsdl
@@ -1092,10 +1092,10 @@ function Policy-CrudTest {
1092
1092
1093
1093
# load from file get to pipeline scenarios
1094
1094
1095
- $tenantValidPath = " . /Resources/TenantValidPolicy.xml"
1096
- $productValidPath = " . /Resources/ProductValidPolicy.xml"
1097
- $apiValidPath = " . /Resources/ApiValidPolicy.xml"
1098
- $operationValidPath = " . /Resources/OperationValidPolicy.xml"
1095
+ $tenantValidPath = " $TestOutputRoot /Resources/TenantValidPolicy.xml"
1096
+ $productValidPath = " $TestOutputRoot /Resources/ProductValidPolicy.xml"
1097
+ $apiValidPath = " $TestOutputRoot /Resources/ApiValidPolicy.xml"
1098
+ $operationValidPath = " $TestOutputRoot /Resources/OperationValidPolicy.xml"
1099
1099
1100
1100
$context = New-AzureRmApiManagementContext - ResourceGroupName $resourceGroupName - ServiceName $serviceName
1101
1101
@@ -1180,9 +1180,9 @@ function Policy-CrudTest {
1180
1180
$set = Set-AzureRmApiManagementPolicy - Context $context - Policy $tenantValid - PassThru
1181
1181
Assert-AreEqual $true $set
1182
1182
1183
- Get-AzureRmApiManagementPolicy - Context $context - SaveAs ' TenantPolicy.xml' - Force
1184
- $exists = [System.IO.File ]::Exists(' TenantPolicy.xml' )
1185
- $policy = gc ' TenantPolicy.xml'
1183
+ Get-AzureRmApiManagementPolicy - Context $context - SaveAs " $TestOutputRoot / TenantPolicy.xml" - Force
1184
+ $exists = [System.IO.File ]::Exists(" $TestOutputRoot / TenantPolicy.xml" )
1185
+ $policy = gc " $TestOutputRoot / TenantPolicy.xml"
1186
1186
Assert-True {$policy -like ' *<find-and-replace from="aaa" to="BBB" />*' }
1187
1187
}
1188
1188
finally {
@@ -1200,9 +1200,9 @@ function Policy-CrudTest {
1200
1200
$set = Set-AzureRmApiManagementPolicy - Context $context - Policy $productValid - ProductId $product.ProductId - PassThru
1201
1201
Assert-AreEqual $true $set
1202
1202
1203
- Get-AzureRmApiManagementPolicy - Context $context - ProductId $product.ProductId - SaveAs ' ProductPolicy.xml' - Force
1204
- $exists = [System.IO.File ]::Exists(' ProductPolicy.xml' )
1205
- $policy = gc ' ProductPolicy.xml'
1203
+ Get-AzureRmApiManagementPolicy - Context $context - ProductId $product.ProductId - SaveAs " $TestOutputRoot / ProductPolicy.xml" - Force
1204
+ $exists = [System.IO.File ]::Exists(" $TestOutputRoot / ProductPolicy.xml" )
1205
+ $policy = gc " $TestOutputRoot / ProductPolicy.xml"
1206
1206
Assert-True {$policy -like ' *<rate-limit calls="5" renewal-period="60" />*' }
1207
1207
}
1208
1208
finally {
@@ -1213,7 +1213,7 @@ function Policy-CrudTest {
1213
1213
Assert-Null $policy
1214
1214
1215
1215
try {
1216
- rm ' ProductPolicy.xml'
1216
+ rm " $TestOutputRoot / ProductPolicy.xml"
1217
1217
}
1218
1218
catch {}
1219
1219
}
@@ -1225,9 +1225,9 @@ function Policy-CrudTest {
1225
1225
$set = Set-AzureRmApiManagementPolicy - Context $context - Policy $apiValid - ApiId $api.ApiId - PassThru
1226
1226
Assert-AreEqual $true $set
1227
1227
1228
- $policy = Get-AzureRmApiManagementPolicy - Context $context - ApiId $api.ApiId - SaveAs ' ApiPolicy.xml' - Force
1229
- $exists = [System.IO.File ]::Exists(' ApiPolicy.xml' )
1230
- $policy = gc ' ApiPolicy.xml'
1228
+ $policy = Get-AzureRmApiManagementPolicy - Context $context - ApiId $api.ApiId - SaveAs " $TestOutputRoot / ApiPolicy.xml" - Force
1229
+ $exists = [System.IO.File ]::Exists(" $TestOutputRoot / ApiPolicy.xml" )
1230
+ $policy = gc " $TestOutputRoot / ApiPolicy.xml"
1231
1231
Assert-True {$policy -like ' *<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none">*' }
1232
1232
}
1233
1233
finally {
@@ -1238,7 +1238,7 @@ function Policy-CrudTest {
1238
1238
Assert-Null $policy
1239
1239
1240
1240
try {
1241
- rm ' ApiPolicy.xml'
1241
+ rm " $TestOutputRoot / ApiPolicy.xml"
1242
1242
}
1243
1243
catch {}
1244
1244
}
@@ -1253,9 +1253,9 @@ function Policy-CrudTest {
1253
1253
Assert-AreEqual $true $set
1254
1254
1255
1255
$policy = Get-AzureRmApiManagementPolicy - Context $context - ApiId $api.ApiId - OperationId $operation.OperationId `
1256
- - SaveAs ' OperationPolicy.xml' - Force
1257
- $exists = [System.IO.File ]::Exists(' OperationPolicy.xml' )
1258
- $policy = gc ' OperationPolicy.xml'
1256
+ - SaveAs " $TestOutputRoot / OperationPolicy.xml" - Force
1257
+ $exists = [System.IO.File ]::Exists(" $TestOutputRoot / OperationPolicy.xml" )
1258
+ $policy = gc " $TestOutputRoot / OperationPolicy.xml"
1259
1259
Assert-True {$policy -like ' *<rewrite-uri template="/resource" />*' }
1260
1260
}
1261
1261
finally {
@@ -1266,7 +1266,7 @@ function Policy-CrudTest {
1266
1266
Assert-Null $policy
1267
1267
1268
1268
try {
1269
- rm ' OperationPolicy.xml'
1269
+ rm " $TestOutputRoot / OperationPolicy.xml"
1270
1270
}
1271
1271
catch {}
1272
1272
}
@@ -2057,7 +2057,7 @@ function Backend-CrudTest {
2057
2057
Assert-AreEqual 1 $backend.Properties.Count
2058
2058
Assert-NotNull $backend.Proxy
2059
2059
Assert-AreEqual $backend.Proxy.Url " http://12.168.1.1:8080"
2060
- Assert-NotNull $backend.Proxy.ProxyCredential
2060
+ Assert-NotNull $backend.Proxy.ProxyCredentials
2061
2061
}
2062
2062
finally {
2063
2063
# remove created backend
0 commit comments