Skip to content

Commit 80b7b4b

Browse files
author
Hovsep
committed
Merge pull request Azure#1282 from yoavrubin/dev
SQL audit and threat detection tests updates
2 parents 14be7de + 533708f commit 80b7b4b

File tree

41 files changed

+51433
-25213
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+51433
-25213
lines changed

src/ResourceManager/Sql/Commands.Sql.Test/Commands.Sql.Test.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,16 @@
535535
<None Include="SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.LocationCapabilitiesTests\TestLocationCapabilities.json">
536536
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
537537
</None>
538-
<None Include="Templates\sql-ddm-test-env-setup.json">
538+
<None Include="Templates\sql-audit-test-env-setup-storageV2.json">
539+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
540+
</None>
541+
<None Include="Templates\sql-audit-test-env-setup-classic-storage.json">
539542
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
540543
</None>
541-
<None Include="Templates\sql-audit-test-env-setup.json">
544+
<None Include="Templates\sql-td-test-env-setup.json">
545+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
546+
</None>
547+
<None Include="Templates\sql-ddm-test-env-setup.json">
542548
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
543549
</None>
544550
</ItemGroup>

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected override void SetupManagementClients()
3232
helper.SetupSomeOfManagementClients(sqlCSMClient, storageClient, storageV2Client, resourcesClient, authorizationClient);
3333
}
3434

35-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
35+
[Fact]
3636
[Trait(Category.AcceptanceType, Category.Sql)]
3737
public void TestAuditingDatabaseUpdatePolicyWithStorage()
3838
{
@@ -46,168 +46,168 @@ public void TestAuditingDatabaseUpdatePolicyWithStorageV2()
4646
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithStorageV2");
4747
}
4848

49-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
49+
[Fact]
5050
[Trait(Category.AcceptanceType, Category.Sql)]
5151
public void TestAuditingServerUpdatePolicyWithStorage()
5252
{
5353
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithStorage");
5454
}
5555

56-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
56+
[Fact]
5757
[Trait(Category.AcceptanceType, Category.Sql)]
5858
public void TestAuditingDatabaseUpdatePolicyWithEventTypes()
5959
{
6060
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithEventTypes");
6161
}
6262

63-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
63+
[Fact]
6464
[Trait(Category.AcceptanceType, Category.Sql)]
6565
public void TestAuditingServerUpdatePolicyWithEventTypes()
6666
{
6767
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithEventTypes");
6868
}
6969

70-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
70+
[Fact]
7171
[Trait(Category.AcceptanceType, Category.Sql)]
7272
public void TestAuditingDisableDatabaseAuditing()
7373
{
7474
RunPowerShellTest("Test-AuditingDisableDatabaseAuditing");
7575
}
7676

77-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
77+
[Fact]
7878
[Trait(Category.AcceptanceType, Category.Sql)]
7979
public void TestAuditingDisableServerAuditing()
8080
{
8181
RunPowerShellTest("Test-AuditingDisableServerAuditing");
8282
}
8383

84-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
84+
[Fact]
8585
[Trait(Category.AcceptanceType, Category.Sql)]
8686
public void TestAuditingDatabaseDisableEnableKeepProperties()
8787
{
8888
RunPowerShellTest("Test-AuditingDatabaseDisableEnableKeepProperties");
8989
}
9090

91-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
91+
[Fact]
9292
[Trait(Category.AcceptanceType, Category.Sql)]
9393
public void TestAuditingServerDisableEnableKeepProperties()
9494
{
9595
RunPowerShellTest("Test-AuditingServerDisableEnableKeepProperties");
9696
}
9797

98-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
98+
[Fact]
9999
[Trait(Category.AcceptanceType, Category.Sql)]
100100
public void TestAuditingUseServerDefault()
101101
{
102102
RunPowerShellTest("Test-AuditingUseServerDefault");
103103
}
104104

105-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
105+
[Fact]
106106
[Trait(Category.AcceptanceType, Category.Sql)]
107107
public void TestAuditingFailedDatabaseUpdatePolicyWithNoStorage()
108108
{
109109
RunPowerShellTest("Test-AuditingFailedDatabaseUpdatePolicyWithNoStorage");
110110
}
111111

112-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
112+
[Fact]
113113
[Trait(Category.AcceptanceType, Category.Sql)]
114114
public void TestAuditingFailedServerUpdatePolicyWithNoStorage()
115115
{
116116
RunPowerShellTest("Test-AuditingFailedServerUpdatePolicyWithNoStorage");
117117
}
118118

119-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
119+
[Fact]
120120
[Trait(Category.AcceptanceType, Category.Sql)]
121121
public void TestAuditingFailedUseServerDefault()
122122
{
123123
RunPowerShellTest("Test-AuditingFailedUseServerDefault");
124124
}
125125

126-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
126+
[Fact]
127127
[Trait(Category.AcceptanceType, Category.Sql)]
128128
public void TestAuditingDatabaseUpdatePolicyWithEventTypeShortcuts()
129129
{
130130
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithEventTypeShortcuts");
131131
}
132132

133-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
133+
[Fact]
134134
[Trait(Category.AcceptanceType, Category.Sql)]
135135
public void TestAuditingServerUpdatePolicyWithEventTypeShortcuts()
136136
{
137137
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithEventTypeShortcuts");
138138
}
139139

140-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
140+
[Fact]
141141
[Trait(Category.AcceptanceType, Category.Sql)]
142142
public void TestAuditingDatabaseUpdatePolicyKeepPreviousStorage()
143143
{
144144
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyKeepPreviousStorage");
145145
}
146146

147-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
147+
[Fact]
148148
[Trait(Category.AcceptanceType, Category.Sql)]
149149
public void TestAuditingServerUpdatePolicyKeepPreviousStorage()
150150
{
151151
RunPowerShellTest("Test-AuditingServerUpdatePolicyKeepPreviousStorage");
152152
}
153153

154-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
154+
[Fact]
155155
[Trait(Category.AcceptanceType, Category.Sql)]
156156
public void TestAuditingFailWithBadDatabaseIndentity()
157157
{
158158
RunPowerShellTest("Test-AuditingFailWithBadDatabaseIndentity");
159159
}
160160

161-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
161+
[Fact]
162162
[Trait(Category.AcceptanceType, Category.Sql)]
163163
public void TestAuditingFailWithBadServerIndentity()
164164
{
165165
RunPowerShellTest("Test-AuditingFailWithBadServerIndentity");
166166
}
167167

168-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
168+
[Fact]
169169
[Trait(Category.AcceptanceType, Category.Sql)]
170170
public void TestAuditingDatabaseStorageKeyRotation()
171171
{
172172
RunPowerShellTest("Test-AuditingDatabaseStorageKeyRotation");
173173
}
174174

175-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
175+
[Fact]
176176
[Trait(Category.AcceptanceType, Category.Sql)]
177177
public void TestAuditingServerStorageKeyRotation()
178178
{
179179
RunPowerShellTest("Test-AuditingServerStorageKeyRotation");
180180
}
181181

182-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
182+
[Fact]
183183
[Trait(Category.AcceptanceType, Category.Sql)]
184184
public void TestAuditingServerUpdatePolicyWithRetention()
185185
{
186186
RunPowerShellTest("Test-AuditingServerUpdatePolicyWithRetention");
187187
}
188188

189-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
189+
[Fact]
190190
[Trait(Category.AcceptanceType, Category.Sql)]
191191
public void TestAuditingDatabaseUpdatePolicyWithRetention()
192192
{
193193
RunPowerShellTest("Test-AuditingDatabaseUpdatePolicyWithRetention");
194194
}
195195

196-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
196+
[Fact]
197197
[Trait(Category.AcceptanceType, Category.Sql)]
198198
public void TestAuditingServerRetentionKeepProperties()
199199
{
200200
RunPowerShellTest("Test-AuditingServerRetentionKeepProperties");
201201
}
202202

203-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
203+
[Fact]
204204
[Trait(Category.AcceptanceType, Category.Sql)]
205205
public void TestAuditingDatabaseRetentionKeepProperties()
206206
{
207207
RunPowerShellTest("Test-AuditingDatabaseRetentionKeepProperties");
208208
}
209209

210-
[Fact(Skip = "PSGet: TODO fix by moving SM specific logic to test setup")]
210+
[Fact]
211211
[Trait(Category.AcceptanceType, Category.Sql)]
212212
public void TestAuditingDatabaseUpdatePolicyWithSameNameStorageOnDifferentRegion()
213213
{

0 commit comments

Comments
 (0)