diff --git a/private/testing/Get-TestConfig.ps1 b/private/testing/Get-TestConfig.ps1 index 9c1068379f..fac47987e0 100644 --- a/private/testing/Get-TestConfig.ps1 +++ b/private/testing/Get-TestConfig.ps1 @@ -68,7 +68,8 @@ function Get-TestConfig { $config['CommandName'] = "Unknown" } - $config['CommonParameters'] = [System.Management.Automation.PSCmdlet]::CommonParameters + # sometimes the enumeration doesn't work, so we'll just hardcode it + $config['CommonParameters'] = "Verbose", "Debug", "ErrorAction", "WarningAction", "InformationAction", "ProgressAction", "ErrorVariable", "WarningVariable", "OutVariable", "OutBuffer", "PipelineVariable", "InformationVariable" [pscustomobject]$config } \ No newline at end of file diff --git a/tests/Get-DbaConnectedInstance.Tests.ps1 b/tests/Get-DbaConnectedInstance.Tests.ps1 index cf148499c6..e842324d1d 100644 --- a/tests/Get-DbaConnectedInstance.Tests.ps1 +++ b/tests/Get-DbaConnectedInstance.Tests.ps1 @@ -4,23 +4,7 @@ param( $PSDefaultParameterValues = ($TestConfig = Get-TestConfig).Defaults ) -Describe "Get-DbaConnectedInstance" -Tag "UnitTests" { - BeforeAll { - $command = Get-Command Get-DbaConnectedInstance - $expected = $TestConfig.CommonParameters - } - - Context "Parameter validation" { - It "Has parameter: <_>" -ForEach $expected { - $command | Should -HaveParameter $PSItem - } - - It "Should have exactly the number of expected parameters ($($expected.Count))" { - $hasparms = $command.Parameters.Values.Name - Compare-Object -ReferenceObject $expected -DifferenceObject $hasparms | Should -BeNullOrEmpty - } - } -} +# no params to test Describe "Get-DbaConnectedInstance" -Tag "IntegrationTests" { BeforeAll {