File tree Expand file tree Collapse file tree 5 files changed +921
-11
lines changed
Commands.Sql/Auditing/Services
SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests Expand file tree Collapse file tree 5 files changed +921
-11
lines changed Original file line number Diff line number Diff line change 485
485
</None >
486
486
<None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests\TestDatatabaseAuditingTypeMigration.json" >
487
487
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
488
+ </None >
489
+ <None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests\TestGetServerAndDatabaseAuditingInUkRegion.json" >
490
+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
488
491
</None >
489
492
<None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AuditingTests\TestServerAuditingTypeMigration.json" >
490
493
<CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
Original file line number Diff line number Diff line change @@ -242,11 +242,18 @@ public void TestServerAuditingTypeMigration()
242
242
RunPowerShellTest ( "Test-ServerAuditingTypeMigration" ) ;
243
243
}
244
244
245
- [ Fact ( Skip = "Waiting backend validation" ) ]
245
+ [ Fact ( Skip = "Waiting backend validation" ) ]
246
246
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
247
247
public void TestAuditingDatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion ( )
248
248
{
249
249
RunPowerShellTest ( "Test-AuditingDatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion" ) ;
250
250
}
251
+
252
+ [ Fact ]
253
+ [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
254
+ public void TestGetServerAndDatabaseAuditingInUkRegion ( )
255
+ {
256
+ RunPowerShellTest ( "Test-GetServerAndDatabaseAuditingInUkRegion" ) ;
257
+ }
251
258
}
252
259
}
Original file line number Diff line number Diff line change @@ -1098,3 +1098,37 @@ function Test-ServerAuditingTypeMigration
1098
1098
Remove-TestEnvironment $testSuffix
1099
1099
}
1100
1100
}
1101
+
1102
+ <#
1103
+ . SYNOPSIS
1104
+ Tests that Get Server and Database Auditing on UK passes
1105
+ #>
1106
+ function Test-GetServerAndDatabaseAuditingInUkRegion
1107
+ {
1108
+ # Setup
1109
+ $testSuffix = 684412
1110
+ Create- TestEnvironment $testSuffix " UK South"
1111
+ $params = Get-SqlAuditingTestEnvironmentParameters $testSuffix
1112
+
1113
+ try
1114
+ {
1115
+ # Test
1116
+ $policy = Get-AzureRmSqlServerAuditingPolicy - ResourceGroupName $params.rgname - ServerName $params.serverName
1117
+
1118
+ # Assert
1119
+ Assert-AreEqual $policy.AuditState " Disabled"
1120
+ Assert-AreEqual $policy.RetentionInDays 0
1121
+
1122
+ # Test
1123
+ $policy = Get-AzureRmSqlDatabaseAuditingPolicy - ResourceGroupName $params.rgname - ServerName $params.serverName - DatabaseName $params.databaseName
1124
+
1125
+ # Assert
1126
+ Assert-AreEqual $policy.AuditState " Disabled"
1127
+ Assert-AreEqual $policy.RetentionInDays 0
1128
+ }
1129
+ finally
1130
+ {
1131
+ # Cleanup
1132
+ Remove-TestEnvironment $testSuffix
1133
+ }
1134
+ }
You can’t perform that action at this time.
0 commit comments