@@ -34,7 +34,7 @@ Describe $CommandName -Tag IntegrationTests {
3434 $random = Get-Random
3535 $dbName = " dbatoolsci_dataclass_$random "
3636 $tableName = " dbatoolsci_table_$random "
37- $db = New-DbaDatabase - SqlInstance $TestConfig.instance2 - Name $dbName
37+ $db = New-DbaDatabase - SqlInstance $TestConfig.SingleInstance - Name $dbName
3838
3939 # Create a test table with columns to classify
4040 $db.Query (" CREATE TABLE dbo.$tableName (Id INT, EmailAddress NVARCHAR(255), CreditCardNumber NVARCHAR(20))" )
@@ -53,40 +53,40 @@ Describe $CommandName -Tag IntegrationTests {
5353 # We want to run all commands in the AfterAll block with EnableException to ensure that the test fails if the cleanup fails.
5454 $PSDefaultParameterValues [" *-Dba*:EnableException" ] = $true
5555
56- $null = Remove-DbaDatabase - SqlInstance $TestConfig.instance2 - Database $dbName - Confirm:$false
56+ $null = Remove-DbaDatabase - SqlInstance $TestConfig.SingleInstance - Database $dbName - Confirm:$false
5757
5858 $PSDefaultParameterValues.Remove (" *-Dba*:EnableException" )
5959 }
6060
6161 Context " commands work as expected" {
6262
6363 It " finds classifications in a database" {
64- $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.instance2 - Database $dbName
64+ $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.SingleInstance - Database $dbName
6565 $result | Should -Not - BeNullOrEmpty
6666 $result.Count | Should - Be 1
6767 }
6868
6969 It " returns correct classification details" {
70- $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.instance2 - Database $dbName
70+ $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.SingleInstance - Database $dbName
7171 $result.Table | Should - Be $tableName
7272 $result.Column | Should - Be " EmailAddress"
7373 $result.InformationType | Should - Be " Contact Info"
7474 $result.SensitivityLabel | Should - Be " Confidential"
7575 }
7676
7777 It " filters by table" {
78- $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.instance2 - Database $dbName - Table $tableName
78+ $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.SingleInstance - Database $dbName - Table $tableName
7979 $result | Should -Not - BeNullOrEmpty
8080 }
8181
8282 It " filters by column" {
83- $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.instance2 - Database $dbName - Column " EmailAddress"
83+ $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.SingleInstance - Database $dbName - Column " EmailAddress"
8484 $result | Should -Not - BeNullOrEmpty
8585 $result.Column | Should - Be " EmailAddress"
8686 }
8787
8888 It " returns nothing for unclassified column filter" {
89- $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.instance2 - Database $dbName - Column " CreditCardNumber"
89+ $result = Get-DbaDbDataClassification - SqlInstance $TestConfig.SingleInstance - Database $dbName - Column " CreditCardNumber"
9090 $result | Should - BeNullOrEmpty
9191 }
9292
0 commit comments