-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SecurityTestRunner to replace TestController (#18189)
* Add SecurityTestRunner to replace TestController * Revert Az.Security document changes
- Loading branch information
1 parent
de81122
commit 7d8e998
Showing
35 changed files
with
259 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 6 additions & 14 deletions
20
src/Security/Security.Test/ScenarioTests/AllowedConnectionTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,33 @@ | ||
using Microsoft.Azure.Commands.ScenarioTest; | ||
using Microsoft.Azure.ServiceManagement.Common.Models; | ||
using Microsoft.WindowsAzure.Commands.ScenarioTest; | ||
using Microsoft.WindowsAzure.Commands.ScenarioTest; | ||
using Xunit; | ||
|
||
namespace Microsoft.Azure.Commands.Security.Test.ScenarioTests | ||
{ | ||
public class AllowedConnectionTests | ||
public class AllowedConnectionTests : SecurityTestRunner | ||
{ | ||
private readonly XunitTracingInterceptor _logger; | ||
|
||
public AllowedConnectionTests (Xunit.Abstractions.ITestOutputHelper output) | ||
public AllowedConnectionTests (Xunit.Abstractions.ITestOutputHelper output) : base(output) | ||
{ | ||
_logger = new XunitTracingInterceptor(output); | ||
XunitTracingInterceptor.AddToContext(_logger); | ||
TestExecutionHelpers.SetUpSessionAndProfile(); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void GetSubscriptionScope() | ||
{ | ||
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmAllowedConnection-SubscriptionScope"); | ||
TestRunner.RunTestScript("Get-AzureRmAllowedConnection-SubscriptionScope"); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void GetResourceGroupLevelResource() | ||
{ | ||
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmAllowedConnection-ResourceGroupLevelResource"); | ||
TestRunner.RunTestScript("Get-AzureRmAllowedConnection-ResourceGroupLevelResource"); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void GetResourceId() | ||
{ | ||
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzureRmAllowedConnection-ResourceId"); | ||
TestRunner.RunTestScript("Get-AzureRmAllowedConnection-ResourceId"); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 5 additions & 13 deletions
18
src/Security/Security.Test/ScenarioTests/SecurityAdaptiveApplicationControlTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
using Microsoft.Azure.Commands.ScenarioTest; | ||
using Microsoft.Azure.ServiceManagement.Common.Models; | ||
using Microsoft.WindowsAzure.Commands.ScenarioTest; | ||
using Microsoft.WindowsAzure.Commands.ScenarioTest; | ||
using Xunit; | ||
|
||
namespace Microsoft.Azure.Commands.Security.Test.ScenarioTests | ||
{ | ||
public class SecurityAdaptiveApplicationControlTests | ||
public class SecurityAdaptiveApplicationControlTests : SecurityTestRunner | ||
{ | ||
private readonly XunitTracingInterceptor _logger; | ||
|
||
public SecurityAdaptiveApplicationControlTests(Xunit.Abstractions.ITestOutputHelper output) | ||
public SecurityAdaptiveApplicationControlTests(Xunit.Abstractions.ITestOutputHelper output) : base(output) | ||
{ | ||
_logger = new XunitTracingInterceptor(output); | ||
XunitTracingInterceptor.AddToContext(_logger); | ||
TestExecutionHelpers.SetUpSessionAndProfile(); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void GetAdaptiveApplicationControlGroup() | ||
{ | ||
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzSecurityAdaptiveApplicationControlGroup-ResourceGroupScope"); | ||
TestRunner.RunTestScript("Get-AzSecurityAdaptiveApplicationControlGroup-ResourceGroupScope"); | ||
} | ||
|
||
[Fact] | ||
[Trait(Category.AcceptanceType, Category.CheckIn)] | ||
public void GetAdaptiveApplicationControlList() | ||
{ | ||
TestController.NewInstance.RunPowerShellTest(_logger, "Get-AzSecurityAdaptiveApplicationControl-SubscriptionScope"); | ||
TestRunner.RunTestScript("Get-AzSecurityAdaptiveApplicationControl-SubscriptionScope"); | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.