Skip to content

Commit 56a9df2

Browse files
Merge pull request Azure#8771 from bashahee/DcSupport
Support Database Data Classification
2 parents 9421ea7 + b0d3c39 commit 56a9df2

File tree

38 files changed

+41993
-19
lines changed

38 files changed

+41993
-19
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
using Microsoft.Azure.Commands.ScenarioTest.SqlTests;
15+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
16+
using Xunit;
17+
using Xunit.Abstractions;
18+
using RestTestFramework = Microsoft.Rest.ClientRuntime.Azure.TestFramework;
19+
20+
namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests
21+
{
22+
public class DataClassificationTests : SqlTestsBase
23+
{
24+
public DataClassificationTests(ITestOutputHelper output) : base(output)
25+
{
26+
}
27+
28+
protected override void SetupManagementClients(RestTestFramework.MockContext context)
29+
{
30+
var sqlClient = GetSqlClient(context);
31+
var newResourcesClient = GetResourcesClient(context);
32+
var networkClient = GetNetworkClient(context);
33+
Helper.SetupSomeOfManagementClients(sqlClient, newResourcesClient, networkClient);
34+
}
35+
[Fact]
36+
[Trait(Category.AcceptanceType, Category.CheckIn)]
37+
public void TestDataClassificationOnSqlDatabase()
38+
{
39+
RunPowerShellTest("Test-DataClassificationOnSqlDatabase");
40+
}
41+
42+
[Fact]
43+
[Trait(Category.AcceptanceType, Category.CheckIn)]
44+
public void TestErrorIsThrownWhenInvalidClassificationIsSet()
45+
{
46+
RunPowerShellTest("Test-ErrorIsThrownWhenInvalidClassificationIsSet");
47+
}
48+
49+
[Fact]
50+
[Trait(Category.AcceptanceType, Category.CheckIn)]
51+
public void TestBasicDataClassificationOnSqlManagedDatabase()
52+
{
53+
RunPowerShellTest("Test-BasicDataClassificationOnSqlManagedDatabase");
54+
}
55+
}
56+
}

src/Sql/Sql.Test/ScenarioTests/DataClassificationTests.ps1

Lines changed: 530 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)