Skip to content

Commit feaf980

Browse files
committed
Audit tests to with policies that use V2 storage
1 parent 9179663 commit feaf980

File tree

4 files changed

+383
-604
lines changed

4 files changed

+383
-604
lines changed

src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/AuditingTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ public void TestAuditingDatabaseUpdatePolicyWithStorageV2()
5656
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithStorageV2");
5757
}
5858

59-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")] [Trait(Category.AcceptanceType, Category.Sql)]
59+
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
60+
[Trait(Category.AcceptanceType, Category.Sql)]
6061
public void TestAuditingServerUpdatePolicyWithStorage()
6162
{
6263
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithStorage");
6364
}
6465

65-
[Fact]//(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
66+
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
6667
[Trait(Category.AcceptanceType, Category.Sql)]
6768
public void TestAuditingDatabaseUpdatePolicyWithEventTypes()
6869
{

src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/Common.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function Create-TestEnvironmentWithParams ($params)
6363
{
6464
New-AzureRmResourceGroup -Name $params.rgname -Location "West US" -Force
6565
New-AzureRmResourceGroupDeployment -ResourceGroupName $params.rgname -TemplateFile ".\Templates\sql-audit-test-env-setup.json" -serverName $params.serverName -databaseName $params.databaseName -EnvLocation "West US" -Force
66-
Azure\New-AzureStorageAccount -Name $params.storageAccount -Location "West US" -Type "Standard_GRS"
66+
New-AzureRmStorageAccount -Name $params.storageAccount -Location "West US" -ResourceGroupName $params.rgname -Type "Standard_GRS
6767
}
6868
6969
<#

src/ResourceManager/Sql/Commands.Sql.Test/ScenarioTests/SqlTestsBase.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected void RunPowerShellTest(params string[] scripts)
7070

7171
helper.SetupEnvironment();
7272

73-
helper.SetupModules(AzureModule.AzureServiceManagement,
73+
helper.SetupModules(AzureModule.AzureResourceManager,
7474
"ScenarioTests\\Common.ps1",
7575
"ScenarioTests\\" + this.GetType().Name + ".ps1",
7676
helper.RMProfileModule,
@@ -79,9 +79,6 @@ protected void RunPowerShellTest(params string[] scripts)
7979
helper.RMStorageModule,
8080
helper.GetRMModulePath(@"AzureRM.Insights.psd1"),
8181
helper.GetRMModulePath(@"AzureRM.Sql.psd1"));
82-
83-
84-
8582
helper.RunPowerShellTest(scripts);
8683
}
8784
}

0 commit comments

Comments
 (0)