Skip to content

Commit b3ea980

Browse files
committed
Changing the test certificate path from relative to absolute.
1 parent 9c90e92 commit b3ea980

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ApplicationGatewayTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using System;
1516
using Microsoft.Azure.ServiceManagemenet.Common.Models;
1617
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1718
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
@@ -31,7 +32,7 @@ public ApplicationGatewayTests(ITestOutputHelper output)
3132
[Trait(Category.AcceptanceType, Category.CheckIn)]
3233
public void TestApplicationGatewayCRUD()
3334
{
34-
NetworkResourcesController.NewInstance.RunPsTest("Test-ApplicationGatewayCRUD");
35+
NetworkResourcesController.NewInstance.RunPsTest(string.Format("Test-ApplicationGatewayCRUD -baseDir '{0}'", AppDomain.CurrentDomain.BaseDirectory));
3536
}
3637
}
3738
}

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ApplicationGatewayTests.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ Application gateway tests
1818
#>
1919
function Test-ApplicationGatewayCRUD
2020
{
21+
param
22+
(
23+
$basedir = ".\"
24+
)
25+
2126
# Setup
2227

2328
$rglocation = Get-ProviderLocation ResourceManagement
@@ -81,7 +86,8 @@ function Test-ApplicationGatewayCRUD
8186
$fp01 = New-AzureRmApplicationGatewayFrontendPort -Name $frontendPort01Name  -Port 80
8287
$fp02 = New-AzureRmApplicationGatewayFrontendPort -Name $frontendPort02Name  -Port 8080
8388

84-
$authcert01 = New-AzureRmApplicationGatewayAuthenticationCertificate -Name $authCertName -CertificateFile ".\ScenarioTests\Data\ApplicationGatewayAuthCert.cer"
89+
$authCertFilePath = $basedir + "\ScenarioTests\Data\ApplicationGatewayAuthCert.cer"
90+
$authcert01 = New-AzureRmApplicationGatewayAuthenticationCertificate -Name $authCertName -CertificateFile $authCertFilePath
8591
$poolSetting01 = New-AzureRmApplicationGatewayBackendHttpSettings -Name $poolSetting01Name -Port 80 -Protocol Http -CookieBasedAffinity Disabled
8692
$poolSetting02 = New-AzureRmApplicationGatewayBackendHttpSettings -Name $poolSetting02Name -Port 443 -Protocol Https -CookieBasedAffinity Enabled -AuthenticationCertificates $authcert01
8793

0 commit comments

Comments
 (0)