Skip to content

Commit 563bc73

Browse files
authored
Merge pull request #5465 from maddieclayton/testfix
Add missing test project in TestMappings
2 parents 6659747 + e83a5e9 commit 563bc73

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

TestMappings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
".\\src\\ResourceManager\\AnalysisServices\\Commands.AnalysisServices.Test\\bin\\Debug\\Microsoft.Azure.Commands.AnalysisServices.Test.dll"
1616
],
1717
"src/ResourceManager/ApiManagement/": [
18-
".\\src\\ResourceManager\\ApiManagement\\Commands.ApiManagement.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApiManagement.Test.dll"
18+
".\\src\\ResourceManager\\ApiManagement\\Commands.ApiManagement.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApiManagement.Test.dll",
19+
".\\src\\ResourceManager\\ApiManagement\\Commands.SMAPI.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.dll"
1920
],
2021
"src/ResourceManager/ApplicationInsights/": [
2122
".\\src\\ResourceManager\\ApplicationInsights\\Commands.ApplicationInsights.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApplicationInsights.Test.dll"

src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.ps1

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function Api-ImportExportWadlTest {
164164

165165
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
166166

167-
$wadlPath = "./Resources/WADLYahoo.xml"
167+
$wadlPath = "$TestOutputRoot/Resources/WADLYahoo.xml"
168168
$path = "wadlapi"
169169
$wadlApiId = getAssetName
170170

@@ -196,7 +196,7 @@ function Api-ImportExportSwaggerTest {
196196

197197
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
198198

199-
$swaggerPath = "./Resources/SwaggerPetStoreV2.json"
199+
$swaggerPath = "$TestOutputRoot/Resources/SwaggerPetStoreV2.json"
200200
$swaggerUrl = "http://petstore.swagger.io/v2/swagger.json"
201201
$path1 = "swaggerapifromFile"
202202
$path2 = "swaggerapifromUrl"
@@ -241,7 +241,7 @@ function Api-ImportExportWsdlTest {
241241

242242
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
243243

244-
$wsdlPath1 = "./Resources/Weather.wsdl"
244+
$wsdlPath1 = "$TestOutputRoot/Resources/Weather.wsdl"
245245
$wsdlUrl = "http://www.webservicex.net/stockquote.asmx?WSDL"
246246
$path1 = "soapapifromFile"
247247
$path2 = "soapapifromUrl"
@@ -295,7 +295,7 @@ function Api-ImportWsdlToCreateSoapToRestApi {
295295

296296
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
297297

298-
$wsdlPath1 = "./Resources/Weather.wsdl"
298+
$wsdlPath1 = "$TestOutputRoot/Resources/Weather.wsdl"
299299
$path1 = "soapToRestApi"
300300
$wsdlApiId1 = getAssetName
301301
$wsdlServiceName1 = "Weather" # from file Weather.wsdl
@@ -1092,10 +1092,10 @@ function Policy-CrudTest {
10921092

10931093
# load from file get to pipeline scenarios
10941094

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"
10991099

11001100
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
11011101

@@ -1180,9 +1180,9 @@ function Policy-CrudTest {
11801180
$set = Set-AzureRmApiManagementPolicy -Context $context -Policy $tenantValid -PassThru
11811181
Assert-AreEqual $true $set
11821182

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"
11861186
Assert-True {$policy -like '*<find-and-replace from="aaa" to="BBB" />*'}
11871187
}
11881188
finally {
@@ -1200,9 +1200,9 @@ function Policy-CrudTest {
12001200
$set = Set-AzureRmApiManagementPolicy -Context $context -Policy $productValid -ProductId $product.ProductId -PassThru
12011201
Assert-AreEqual $true $set
12021202

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"
12061206
Assert-True {$policy -like '*<rate-limit calls="5" renewal-period="60" />*'}
12071207
}
12081208
finally {
@@ -1213,7 +1213,7 @@ function Policy-CrudTest {
12131213
Assert-Null $policy
12141214

12151215
try {
1216-
rm 'ProductPolicy.xml'
1216+
rm "$TestOutputRoot/ProductPolicy.xml"
12171217
}
12181218
catch {}
12191219
}
@@ -1225,9 +1225,9 @@ function Policy-CrudTest {
12251225
$set = Set-AzureRmApiManagementPolicy -Context $context -Policy $apiValid -ApiId $api.ApiId -PassThru
12261226
Assert-AreEqual $true $set
12271227

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"
12311231
Assert-True {$policy -like '*<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none">*'}
12321232
}
12331233
finally {
@@ -1238,7 +1238,7 @@ function Policy-CrudTest {
12381238
Assert-Null $policy
12391239

12401240
try {
1241-
rm 'ApiPolicy.xml'
1241+
rm "$TestOutputRoot/ApiPolicy.xml"
12421242
}
12431243
catch {}
12441244
}
@@ -1253,9 +1253,9 @@ function Policy-CrudTest {
12531253
Assert-AreEqual $true $set
12541254

12551255
$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"
12591259
Assert-True {$policy -like '*<rewrite-uri template="/resource" />*'}
12601260
}
12611261
finally {
@@ -1266,7 +1266,7 @@ function Policy-CrudTest {
12661266
Assert-Null $policy
12671267

12681268
try {
1269-
rm 'OperationPolicy.xml'
1269+
rm "$TestOutputRoot/OperationPolicy.xml"
12701270
}
12711271
catch {}
12721272
}
@@ -2057,7 +2057,7 @@ function Backend-CrudTest {
20572057
Assert-AreEqual 1 $backend.Properties.Count
20582058
Assert-NotNull $backend.Proxy
20592059
Assert-AreEqual $backend.Proxy.Url "http://12.168.1.1:8080"
2060-
Assert-NotNull $backend.Proxy.ProxyCredential
2060+
Assert-NotNull $backend.Proxy.ProxyCredentials
20612061
}
20622062
finally {
20632063
# remove created backend

0 commit comments

Comments
 (0)