From 950686a3042d7da9a4c0e08077f701ed7481c6ea Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Mon, 21 Oct 2024 07:20:14 +0200 Subject: [PATCH] updates --- tests/New-DbaSsisCatalog.Tests.ps1 | 6 +++--- tests/Test-DbaDiskSpeed.Tests.ps1 | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/New-DbaSsisCatalog.Tests.ps1 b/tests/New-DbaSsisCatalog.Tests.ps1 index ba125e61f8..703bc986f6 100644 --- a/tests/New-DbaSsisCatalog.Tests.ps1 +++ b/tests/New-DbaSsisCatalog.Tests.ps1 @@ -17,11 +17,11 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" { Context "Catalog is added properly" { # database name is currently fixed $database = "SSISDB" - $db = Get-DbaDatabase -SqlInstance $ssisserver -Database $database + $db = Get-DbaDatabase -SqlInstance $TestConfig.ssisserver -Database $database if (-not $db) { $password = ConvertTo-SecureString MyVisiblePassWord -AsPlainText -Force - $results = New-DbaSsisCatalog -SqlInstance $ssisserver -Password $password -WarningAction SilentlyContinue -WarningVariable warn + $results = New-DbaSsisCatalog -SqlInstance $TestConfig.ssisserver -Password $password -WarningAction SilentlyContinue -WarningVariable warn # Run the tests only if it worked (this could be more accurate but w/e, it's hard to test on appveyor) if ($warn -match "not running") { @@ -36,7 +36,7 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" { It "creates the catalog" { $results.Created | Should Be $true } - Remove-DbaDatabase -Confirm:$false -SqlInstance $ssisserver -Database $database + Remove-DbaDatabase -Confirm:$false -SqlInstance $TestConfig.ssisserver -Database $database } } } diff --git a/tests/Test-DbaDiskSpeed.Tests.ps1 b/tests/Test-DbaDiskSpeed.Tests.ps1 index ea14d8ccdb..86c17e1f8d 100644 --- a/tests/Test-DbaDiskSpeed.Tests.ps1 +++ b/tests/Test-DbaDiskSpeed.Tests.ps1 @@ -34,7 +34,7 @@ Describe "$CommandName Integration Tests" -Tag "IntegrationTests" { $results = @($TestConfig.instance1, $TestConfig.instance2) | Test-DbaDiskSpeed -Database master $results.Count | Should -Be 4 - # for some reason this doesn't work on AppVeyor, perhaps due to the way the instances are started up the instance names do not match the values in constants.ps1 + # for some reason this doesn't work on AppVeyor, perhaps due to the way the instances are started up the instance names do not match the values in Get-TestConfig #(($results.SqlInstance -contains $TestConfig.instance1) -and ($results.SqlInstance -contains $TestConfig.instance2)) | Should -Be $true } @@ -181,7 +181,7 @@ Describe "$CommandName Integration Tests" -Tag "IntegrationTests" { } # Separate test to run against a Linux-hosted SQL instance. - # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the constants.ps1 + # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the Get-TestConfig It -Skip "test commands on a Linux instance" { # use instance with credential info and run through the 3 variations # -Skip to be added when checking in the code @@ -207,7 +207,7 @@ Describe "$CommandName Integration Tests" -Tag "IntegrationTests" { } # Separate test to run against a Linux-hosted SQL instance. - # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the constants.ps1 + # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the Get-TestConfig It -Skip "aggregate by file and check column names returned on a Linux instance" { # check returned columns [object[]]$expectedColumnArray = 'ComputerName', 'InstanceName', 'SqlInstance', 'Database', 'SizeGB', 'FileName', 'FileID', 'FileType', 'DiskLocation', 'Reads', 'AverageReadStall', 'ReadPerformance', 'Writes', 'AverageWriteStall', 'WritePerformance', 'Avg Overall Latency', 'Avg Bytes/Read', 'Avg Bytes/Write', 'Avg Bytes/Transfer' @@ -247,7 +247,7 @@ Describe "$CommandName Integration Tests" -Tag "IntegrationTests" { } # Separate test to run against a Linux-hosted SQL instance. - # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the constants.ps1 + # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the Get-TestConfig It -Skip "aggregate by database and check column names returned on a Linux instance" { # check returned columns [object[]]$expectedColumnArray = 'ComputerName', 'InstanceName', 'SqlInstance', 'Database', 'DiskLocation', 'Reads', 'AverageReadStall', 'ReadPerformance', 'Writes', 'AverageWriteStall', 'WritePerformance', 'Avg Overall Latency', 'Avg Bytes/Read', 'Avg Bytes/Write', 'Avg Bytes/Transfer' @@ -287,7 +287,7 @@ Describe "$CommandName Integration Tests" -Tag "IntegrationTests" { } # Separate test to run against a Linux-hosted SQL instance. - # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the constants.ps1 + # To run this test ensure you have specified the instance2 values for a Linux-hosted SQL instance in the Get-TestConfig It -Skip "aggregate by disk and check column names returned on a Linux instance" { # check returned columns [object[]]$expectedColumnArray = 'ComputerName', 'InstanceName', 'SqlInstance', 'DiskLocation', 'Reads', 'AverageReadStall', 'ReadPerformance', 'Writes', 'AverageWriteStall', 'WritePerformance', 'Avg Overall Latency', 'Avg Bytes/Read', 'Avg Bytes/Write', 'Avg Bytes/Transfer'