@@ -45,15 +45,15 @@ Describe $CommandName -Tag IntegrationTests {
4545 $db2Name = " dbatoolscli_db2_$random "
4646 $pw = ConvertTo-SecureString - String " GoodPass1234!" - AsPlainText - Force
4747
48- $db1 = New-DbaDatabase - SqlInstance $TestConfig.instance1 - Name $db1Name
49- $null = New-DbaDbMasterKey - SqlInstance $TestConfig.instance1 - Database $db1Name - Password $pw
48+ $db1 = New-DbaDatabase - SqlInstance $TestConfig.InstanceSingle - Name $db1Name
49+ $null = New-DbaDbMasterKey - SqlInstance $TestConfig.InstanceSingle - Database $db1Name - Password $pw
5050
51- $db2 = New-DbaDatabase - SqlInstance $TestConfig.instance1 - Name $db2Name
52- $null = New-DbaDbMasterKey - SqlInstance $TestConfig.instance1 - Database $db2Name - Password $pw
51+ $db2 = New-DbaDatabase - SqlInstance $TestConfig.InstanceSingle - Name $db2Name
52+ $null = New-DbaDbMasterKey - SqlInstance $TestConfig.InstanceSingle - Database $db2Name - Password $pw
5353
54- $cert1 = New-DbaDbCertificate - SqlInstance $TestConfig.instance1 - Database $db1Name - Password $pw - Name " dbatoolscli_cert1_$random "
55- $cert2 = New-DbaDbCertificate - SqlInstance $TestConfig.instance1 - Database $db1Name - Password $pw - Name " dbatoolscli_cert2_$random "
56- $cert3 = New-DbaDbCertificate - SqlInstance $TestConfig.instance1 - Database $db2Name - Password $pw - Name " dbatoolscli_cert3_$random "
54+ $cert1 = New-DbaDbCertificate - SqlInstance $TestConfig.InstanceSingle - Database $db1Name - Password $pw - Name " dbatoolscli_cert1_$random "
55+ $cert2 = New-DbaDbCertificate - SqlInstance $TestConfig.InstanceSingle - Database $db1Name - Password $pw - Name " dbatoolscli_cert2_$random "
56+ $cert3 = New-DbaDbCertificate - SqlInstance $TestConfig.InstanceSingle - Database $db2Name - Password $pw - Name " dbatoolscli_cert3_$random "
5757
5858 # We want to run all commands outside of the BeforeAll block without EnableException to be able to test for specific warnings.
5959 $PSDefaultParameterValues.Remove (" *-Dba*:EnableException" )
@@ -62,7 +62,7 @@ Describe $CommandName -Tag IntegrationTests {
6262 # We want to run all commands in the AfterAll block with EnableException to ensure that the test fails if the cleanup fails.
6363 $PSDefaultParameterValues [" *-Dba*:EnableException" ] = $true
6464
65- Remove-DbaDatabase - SqlInstance $TestConfig.instance1 - Database $db1Name , $db2Name
65+ Remove-DbaDatabase - SqlInstance $TestConfig.InstanceSingle - Database $db1Name , $db2Name
6666
6767 # Remove the backup directory.
6868 Remove-Item - Path $backupPath - Recurse
@@ -73,7 +73,7 @@ Describe $CommandName -Tag IntegrationTests {
7373 Context " Can backup a database certificate" {
7474 It " Returns results with proper data" {
7575 $splatBackupCert = @ {
76- SqlInstance = $TestConfig.instance1
76+ SqlInstance = $TestConfig.InstanceSingle
7777 Database = $db1Name
7878 Certificate = $cert1.Name
7979 EncryptionPassword = $pw
@@ -90,7 +90,7 @@ Describe $CommandName -Tag IntegrationTests {
9090 Context " Can backup a database certificate with a filename (see #9485)" {
9191 It " Returns results with proper data" {
9292 $splatBackupCertWithName = @ {
93- SqlInstance = $TestConfig.instance1
93+ SqlInstance = $TestConfig.InstanceSingle
9494 Database = $db1Name
9595 Certificate = $cert1.Name
9696 EncryptionPassword = $pw
@@ -112,7 +112,7 @@ Describe $CommandName -Tag IntegrationTests {
112112 $invalidDBCertName = " dbatoolscli_invalidCertName"
113113 $invalidDBCertName2 = " dbatoolscli_invalidCertName2"
114114 $splatBackupInvalidCert = @ {
115- SqlInstance = $TestConfig.instance1
115+ SqlInstance = $TestConfig.InstanceSingle
116116 Database = $db1Name
117117 Certificate = @ ($invalidDBCertName , $invalidDBCertName2 , $cert2.Name )
118118 EncryptionPassword = $pw
@@ -128,7 +128,7 @@ Describe $CommandName -Tag IntegrationTests {
128128 Context " Backs up all db certs for a database" {
129129 It " Returns results with proper data" {
130130 $splatBackupDbCerts = @ {
131- SqlInstance = $TestConfig.instance1
131+ SqlInstance = $TestConfig.InstanceSingle
132132 Database = $db1Name
133133 EncryptionPassword = $pw
134134 DecryptionPassword = $pw
@@ -143,7 +143,7 @@ Describe $CommandName -Tag IntegrationTests {
143143 Context " Backs up all db certs for an instance" {
144144 It " Returns results with proper data" {
145145 $splatBackupAllCerts = @ {
146- SqlInstance = $TestConfig.instance1
146+ SqlInstance = $TestConfig.InstanceSingle
147147 EncryptionPassword = $pw
148148 DecryptionPassword = $pw
149149 }
0 commit comments