Skip to content

Commit

Permalink
Merge branch 'network-august' into vng-ikesas
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi7860 authored Dec 30, 2020
2 parents 9d9f67c + 77e6ea8 commit a2ea28e
Show file tree
Hide file tree
Showing 29 changed files with 9,886 additions and 10 deletions.
51 changes: 51 additions & 0 deletions src/Network/Network.Test/ScenarioTests/AzureFirewallPolicyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using Microsoft.Azure.Commands.Network.Test.ScenarioTests;
using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using Microsoft.WindowsAzure.Commands.ScenarioTest;
using Xunit;
using Xunit.Abstractions;
Expand Down Expand Up @@ -81,5 +84,53 @@ public void TestAzureFirewallPolicyWithWebCategories()
{
TestRunner.RunTestScript("Test-AzureFirewallPolicyWithWebCategories");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
public void TestAzureFirewallPolicyPremiumFeatures()
{
string environmentConnectionString = Environment.GetEnvironmentVariable("TEST_CSM_ORGID_AUTHENTICATION");
string servicePrincipal = "fakefakefake";
if (!string.IsNullOrEmpty(environmentConnectionString))
{
var connectionInfo = new ConnectionString(Environment.GetEnvironmentVariable("TEST_CSM_ORGID_AUTHENTICATION"));
var mode = connectionInfo.GetValue<string>(ConnectionStringKeys.HttpRecorderModeKey);
if (mode == HttpRecorderMode.Playback.ToString())
{
servicePrincipal = HttpMockServer.GetVariable("spn", "fake");
}
else
{
servicePrincipal = connectionInfo.GetValue<string>(ConnectionStringKeys.ServicePrincipalKey);
HttpMockServer.Variables["spn"] = servicePrincipal;
}
}
TestRunner.RunTestScript(string.Format("Test-AzureFirewallPolicyPremiumFeatures -baseDir '{0}' -spn '{1}'", AppDomain.CurrentDomain.BaseDirectory, servicePrincipal));
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
public void TestAzureFirewallPolicyPremiumWithTerminateTLSEnabled()
{
TestRunner.RunTestScript("Test-AzureFirewallPolicyPremiumWithTerminateTLSEnabled");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
public void TestAzureFirewallPolicyPremiumWithTerminateTLSDisabledAndTargetUrls()
{
TestRunner.RunTestScript("Test-AzureFirewallPolicyPremiumWithTerminateTLSDisabledAndTargetUrls");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
public void TestAzureFirewallPolicyPremiumWithTerminateTLSEnabledAndTargetUrls()
{
TestRunner.RunTestScript("Test-AzureFirewallPolicyPremiumWithTerminateTLSEnabledAndTargetUrls");
}
}
}
431 changes: 430 additions & 1 deletion src/Network/Network.Test/ScenarioTests/AzureFirewallPolicyTests.ps1

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit a2ea28e

Please sign in to comment.