Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Network/Network/Network.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.18.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.40.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Sql" Version="1.41.0-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 9 additions & 1 deletion src/Sql/Sql.Test/ScenarioTests/DataClassificationTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -238,25 +238,29 @@ function Test-DataClassificationOnSqlDatabase
$firstColumnName = $firstRecommendation.ColumnName
$firstInformationType = $firstRecommendation.InformationType
$firstSensitivityLabel = $firstRecommendation.SensitivityLabel
$firstRank = $firstRecommendation.Rank

Assert-AreEqual "dbo" $firstSchemaName
Assert-AreEqual "Persons" $firstTableName
Assert-NotNullOrEmpty $firstColumnName
Assert-NotNullOrEmpty $firstInformationType
Assert-NotNullOrEmpty $firstSensitivityLabel
Assert-NotNullOrEmpty $firstRank

$secondRecommendation = ($recommendations.SensitivityLabels)[1]
$secondSchemaName = $secondRecommendation.SchemaName
$secondTableName = $secondRecommendation.TableName
$secondColumnName = $secondRecommendation.ColumnName
$secondInformationType = $secondRecommendation.InformationType
$secondSensitivityLabel = $secondRecommendation.SensitivityLabel
$secondRank = $secondRecommendation.Rank

Assert-AreEqual "dbo" $secondSchemaName
Assert-AreEqual "Persons" $secondTableName
Assert-NotNullOrEmpty $secondColumnName
Assert-NotNullOrEmpty $secondInformationType
Assert-NotNullOrEmpty $secondSensitivityLabel
Assert-NotNullOrEmpty $secondRank

# Set first two sensitivity labels as recommended and verify.
# Second label is set using pipeline.
Expand All @@ -278,6 +282,7 @@ function Test-DataClassificationOnSqlDatabase
Assert-AreEqual $firstColumnName $classification.ColumnName
Assert-AreEqual $firstInformationType $classification.InformationType
Assert-AreEqual $firstSensitivityLabel $classification.SensitivityLabel
Assert-AreEqual $firstRank $classification.Rank

$secondClassification = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityClassification -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName
Assert-AreEqual 1 ($secondClassification.SensitivityLabels).count
Expand All @@ -287,6 +292,7 @@ function Test-DataClassificationOnSqlDatabase
Assert-AreEqual $secondColumnName $classification.ColumnName
Assert-AreEqual $secondInformationType $classification.InformationType
Assert-AreEqual $secondSensitivityLabel $classification.SensitivityLabel
Assert-AreEqual $secondRank $classification.Rank

# Get, using pipeline, recommended sensitivity labels, and verify.
$recommendations = Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Get-AzSqlDatabaseSensitivityRecommendation
Expand Down Expand Up @@ -503,6 +509,8 @@ function Create-SqlDataClassificationTestEnvironment ($testSuffix, $location = "
New-AzSqlServer -ResourceGroupName $params.rgname -ServerName $params.serverName -ServerVersion $serverVersion -Location $location -SqlAdministratorCredentials $credentials
New-AzSqlServerFirewallRule -ResourceGroupName $params.rgname -ServerName $params.serverName -StartIpAddress 0.0.0.0 -EndIpAddress 255.255.255.255 -FirewallRuleName "dcRule"

# Enable Advanced Data Security
Enable-AzSqlServerAdvancedDataSecurity -ResourceGroupName $params.rgname -ServerName $params.serverName -DoNotConfigureVulnerabilityAssessment

New-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName

Expand Down Expand Up @@ -577,7 +585,7 @@ function Test-EnableDisableRecommendationsOnSqlDatabase
Assert-NotNullOrEmpty $secondInformationType
Assert-NotNullOrEmpty $secondSensitivityLabel

# Disable first two recommdationsd, second recommdation is disabled using pipeline.
# Disable first two recommdations, second recommdation is disabled using pipeline.
Disable-AzSqlDatabaseSensitivityRecommendation -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName -SchemaName $firstSchemaName -TableName $firstTableName -ColumnName $firstColumnName
Get-AzSqlDatabase -ResourceGroupName $params.rgname -ServerName $params.serverName -DatabaseName $params.databaseName | Disable-AzSqlDatabaseSensitivityRecommendation -SchemaName $secondSchemaName -TableName $secondTableName -ColumnName $secondColumnName

Expand Down

Large diffs are not rendered by default.

Loading