From 07eb9465835d61703b04ad8e7aaa8867ad01c865 Mon Sep 17 00:00:00 2001 From: Chrissy LeMaire Date: Mon, 28 Oct 2024 16:31:56 +0100 Subject: [PATCH] Revert "maybe this will provide more reliable test results" This reverts commit 98b3745f5e6fa5f9259a9eb6c39e2e08a53e1a9e. --- .aider/aider.psm1 | 4 ++-- .aider/prompts/conventions.md | 2 +- tests/Add-DbaAgDatabase.Tests.ps1 | 2 +- tests/Add-DbaAgListener.Tests.ps1 | 2 +- tests/Add-DbaAgReplica.Tests.ps1 | 2 +- tests/Add-DbaComputerCertificate.Tests.ps1 | 2 +- tests/Add-DbaDbMirrorMonitor.Tests.ps1 | 2 +- tests/Add-DbaDbRoleMember.Tests.ps1 | 2 +- tests/Add-DbaPfDataCollectorCounter.Tests.ps1 | 2 +- tests/Add-DbaRegServerGroup.Tests.ps1 | 2 +- tests/Add-DbaReplArticle.Tests.ps1 | 2 +- tests/Backup-DbaComputerCertificate.Tests.ps1 | 2 +- tests/Backup-DbaDbCertificate.Tests.ps1 | 2 +- tests/Backup-DbaDbMasterKey.Tests.ps1 | 2 +- tests/Backup-DbaServiceMasterKey.Tests.ps1 | 2 +- tests/Clear-DbaConnectionPool.Tests.ps1 | 2 +- tests/Clear-DbaLatchStatistics.Tests.ps1 | 2 +- tests/Clear-DbaPlanCache.Tests.ps1 | 2 +- tests/Clear-DbaWaitStatistics.Tests.ps1 | 2 +- tests/Convert-DbaLsn.Tests.ps1 | 2 +- tests/Convert-DbaMaskingValue.Tests.ps1 | 2 +- tests/ConvertTo-DbaTimeline.Tests.ps1 | 2 +- tests/ConvertTo-DbaXESession.Tests.ps1 | 2 +- tests/Copy-DbaAgentAlert.Tests.ps1 | 2 +- tests/Copy-DbaAgentJob.Tests.ps1 | 2 +- tests/Copy-DbaAgentJobCategory.Tests.ps1 | 4 ++-- tests/Copy-DbaAgentOperator.Tests.ps1 | 2 +- tests/Copy-DbaAgentProxy.Tests.ps1 | 2 +- tests/Copy-DbaAgentSchedule.Tests.ps1 | 2 +- tests/Copy-DbaAgentServer.Tests.ps1 | 2 +- tests/Copy-DbaBackupDevice.Tests.ps1 | 2 +- tests/Copy-DbaCustomError.Tests.ps1 | 2 +- tests/Copy-DbaDataCollector.Tests.ps1 | 2 +- tests/Copy-DbaDbCertificate.Tests.ps1 | 12 ++++++------ tests/Copy-DbaDbMail.Tests.ps1 | 2 +- tests/Copy-DbaDbQueryStoreOption.Tests.ps1 | 2 +- tests/Copy-DbaDbTableData.Tests.ps1 | 2 +- tests/Copy-DbaEndpoint.Tests.ps1 | 2 +- tests/Copy-DbaInstanceAudit.Tests.ps1 | 2 +- tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 | 2 +- tests/Copy-DbaInstanceTrigger.Tests.ps1 | 2 +- tests/Copy-DbaLinkedServer.Tests.ps1 | 2 +- tests/Copy-DbaPolicyManagement.Tests.ps1 | 2 +- tests/Copy-DbaRegServer.Tests.ps1 | 2 +- tests/Copy-DbaResourceGovernor.Tests.ps1 | 2 +- tests/Copy-DbaSpConfigure.Tests.ps1 | 2 +- tests/Copy-DbaSsisCatalog.Tests.ps1 | 2 +- tests/Copy-DbaStartupProcedure.Tests.ps1 | 2 +- tests/Copy-DbaSystemDbUserObject.Tests.ps1 | 2 +- tests/Copy-DbaXESession.Tests.ps1 | 2 +- tests/Copy-DbaXESessionTemplate.Tests.ps1 | 2 +- tests/Disable-DbaAgHadr.Tests.ps1 | 2 +- tests/Disable-DbaDbEncryption.Tests.ps1 | 2 +- tests/Disable-DbaForceNetworkEncryption.Tests.ps1 | 2 +- tests/Disable-DbaHideInstance.Tests.ps1 | 2 +- tests/Disable-DbaReplDistributor.Tests.ps1 | 2 +- tests/Disable-DbaReplPublishing.Tests.ps1 | 2 +- tests/Disable-DbaStartupProcedure.Tests.ps1 | 2 +- tests/Disable-DbaTraceFlag.Tests.ps1 | 2 +- tests/Disconnect-DbaInstance.Tests.ps1 | 2 +- tests/Dismount-DbaDatabase.Tests.ps1 | 2 +- tests/Enable-DbaAgHadr.Tests.ps1 | 2 +- tests/Enable-DbaDbEncryption.Tests.ps1 | 2 +- tests/Enable-DbaFilestream.Tests.ps1 | 4 ++-- tests/Enable-DbaForceNetworkEncryption.Tests.ps1 | 2 +- tests/Enable-DbaHideInstance.Tests.ps1 | 2 +- tests/Enable-DbaReplDistributor.Tests.ps1 | 2 +- tests/Enable-DbaReplPublishing.Tests.ps1 | 2 +- tests/Enable-DbaTraceFlag.Tests.ps1 | 2 +- tests/Expand-DbaDbLogFile.Tests.ps1 | 2 +- tests/Export-DbaBinaryFile.Tests.ps1 | 2 +- tests/Export-DbaCredential.Tests.ps1 | 2 +- tests/Export-DbaDacPackage.Tests.ps1 | 2 +- tests/Export-DbaDbTableData.Tests.ps1 | 2 +- tests/Export-DbaDiagnosticQuery.Tests.ps1 | 2 +- tests/Export-DbaExecutionPlan.Tests.ps1 | 2 +- tests/Export-DbaLinkedServer.Tests.ps1 | 2 +- tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 | 4 ++-- tests/Export-DbaRegServer.Tests.ps1 | 2 +- tests/Export-DbaReplServerSetting.Tests.ps1 | 2 +- tests/Export-DbaScript.Tests.ps1 | 2 +- tests/Export-DbaServerRole.Tests.ps1 | 6 +++--- tests/Export-DbaSpConfigure.Tests.ps1 | 4 ++-- tests/Export-DbaSysDbUserObject.Tests.ps1 | 2 +- tests/Export-DbaXECsv.Tests.ps1 | 4 ++-- tests/Export-DbaXESession.Tests.ps1 | 2 +- tests/Export-DbatoolsConfig.Tests.ps1 | 2 +- tests/Find-DbaAgentJob.Tests.ps1 | 2 +- tests/Find-DbaBackup.Tests.ps1 | 2 +- tests/Find-DbaCommand.Tests.ps1 | 2 +- tests/Find-DbaDbDisabledIndex.Tests.ps1 | 2 +- tests/Find-DbaDbDuplicateIndex.Tests.ps1 | 2 +- tests/Find-DbaDbGrowthEvent.Tests.ps1 | 2 +- tests/Find-DbaDbUnusedIndex.Tests.ps1 | 2 +- tests/Find-DbaInstance.Tests.ps1 | 2 +- tests/Find-DbaLoginInGroup.Tests.ps1 | 2 +- tests/Find-DbaOrphanedFile.Tests.ps1 | 2 +- tests/Find-DbaSimilarTable.Tests.ps1 | 2 +- tests/Find-DbaStoredProcedure.Tests.ps1 | 2 +- tests/Find-DbaTrigger.Tests.ps1 | 2 +- tests/Find-DbaUserObject.Tests.ps1 | 2 +- tests/Find-DbaView.Tests.ps1 | 2 +- tests/Get-DbaAgBackupHistory.Tests.ps1 | 2 +- tests/Get-DbaAgDatabase.Tests.ps1 | 2 +- tests/Get-DbaAgHadr.Tests.ps1 | 2 +- tests/Get-DbaAgReplica.Tests.ps1 | 2 +- tests/Get-DbaAgentAlert.Tests.ps1 | 2 +- tests/Get-DbaAgentAlertCategory.Tests.ps1 | 2 +- tests/Get-DbaAgentJobCategory.Tests.ps1 | 2 +- tests/Get-DbaAgentJobStep.Tests.ps1 | 2 +- tests/Get-DbaAgentLog.Tests.ps1 | 2 +- tests/Get-DbaAgentOperator.Tests.ps1 | 2 +- tests/Get-DbaAgentProxy.Tests.ps1 | 2 +- tests/Get-DbaAgentServer.Tests.ps1 | 2 +- tests/Get-DbaAvailabilityGroup.Tests.ps1 | 2 +- tests/Get-DbaAvailableCollation.Tests.ps1 | 2 +- tests/Get-DbaBackupDevice.Tests.ps1 | 2 +- tests/Get-DbaBinaryFileTable.Tests.ps1 | 2 +- tests/Get-DbaClientAlias.Tests.ps1 | 2 +- tests/Get-DbaClientProtocol.Tests.ps1 | 2 +- tests/Get-DbaCmConnection.Tests.ps1 | 2 +- tests/Get-DbaCmObject.Tests.ps1 | 2 +- tests/Get-DbaComputerCertificate.Tests.ps1 | 2 +- tests/Get-DbaComputerSystem.Tests.ps1 | 2 +- tests/Get-DbaConnectedInstance.Tests.ps1 | 2 +- tests/Get-DbaConnection.Tests.ps1 | 2 +- tests/Get-DbaCpuRingBuffer.Tests.ps1 | 2 +- tests/Get-DbaCpuUsage.Tests.ps1 | 2 +- tests/Get-DbaCredential.Tests.ps1 | 2 +- tests/Get-DbaCustomError.Tests.ps1 | 2 +- tests/Get-DbaDbAssembly.Tests.ps1 | 2 +- tests/Get-DbaDbAsymmetricKey.Tests.ps1 | 2 +- tests/Get-DbaDbCertificate.Tests.ps1 | 2 +- tests/Get-DbaDbCheckConstraint.Tests.ps1 | 2 +- tests/Get-DbaDbCompatibility.Tests.ps1 | 2 +- tests/Get-DbaDbCompression.Tests.ps1 | 2 +- tests/Get-DbaDbDbccOpenTran.Tests.ps1 | 2 +- tests/Get-DbaDbDetachedFileInfo.Tests.ps1 | 2 +- tests/Get-DbaDbccHelp.Tests.ps1 | 2 +- tests/Get-DbaDbccMemoryStatus.Tests.ps1 | 2 +- tests/Get-DbaDbccProcCache.Tests.ps1 | 2 +- tests/Get-DbaDbccSessionBuffer.Tests.ps1 | 2 +- tests/Get-DbaDbccStatistic.Tests.ps1 | 2 +- tests/Get-DbaDbccUserOption.Tests.ps1 | 2 +- 144 files changed, 157 insertions(+), 157 deletions(-) diff --git a/.aider/aider.psm1 b/.aider/aider.psm1 index f67a192f2c..eb6bfd93d5 100644 --- a/.aider/aider.psm1 +++ b/.aider/aider.psm1 @@ -300,7 +300,7 @@ function Repair-SmallThing { Context "Parameter validation" { BeforeAll { $command = Get-Command Backup-DbaDbMasterKey - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", @@ -320,7 +320,7 @@ function Repair-SmallThing { Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaDbMasterKey - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/.aider/prompts/conventions.md b/.aider/prompts/conventions.md index 4b7027f0ff..ab58b0c974 100644 --- a/.aider/prompts/conventions.md +++ b/.aider/prompts/conventions.md @@ -128,7 +128,7 @@ Describe "Add-DbaAgReplica" -Tag "IntegrationTests" { Describe "Get-DbaDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDatabase - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaAgDatabase.Tests.ps1 b/tests/Add-DbaAgDatabase.Tests.ps1 index ce8678cece..6c857bb9a8 100644 --- a/tests/Add-DbaAgDatabase.Tests.ps1 +++ b/tests/Add-DbaAgDatabase.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaAgDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaAgDatabase - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaAgListener.Tests.ps1 b/tests/Add-DbaAgListener.Tests.ps1 index 1bbf0a95fa..6e7eea3518 100644 --- a/tests/Add-DbaAgListener.Tests.ps1 +++ b/tests/Add-DbaAgListener.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaAgListener" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaAgListener - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaAgReplica.Tests.ps1 b/tests/Add-DbaAgReplica.Tests.ps1 index 2e5abf991d..cb982e2417 100644 --- a/tests/Add-DbaAgReplica.Tests.ps1 +++ b/tests/Add-DbaAgReplica.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaAgReplica" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaAgReplica - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaComputerCertificate.Tests.ps1 b/tests/Add-DbaComputerCertificate.Tests.ps1 index 2e8801500e..71470eed7a 100644 --- a/tests/Add-DbaComputerCertificate.Tests.ps1 +++ b/tests/Add-DbaComputerCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaComputerCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaComputerCertificate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Add-DbaDbMirrorMonitor.Tests.ps1 b/tests/Add-DbaDbMirrorMonitor.Tests.ps1 index 65e05a402e..72cf5222dd 100644 --- a/tests/Add-DbaDbMirrorMonitor.Tests.ps1 +++ b/tests/Add-DbaDbMirrorMonitor.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaDbMirrorMonitor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaDbMirrorMonitor - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaDbRoleMember.Tests.ps1 b/tests/Add-DbaDbRoleMember.Tests.ps1 index afa70d22d1..623595b66b 100644 --- a/tests/Add-DbaDbRoleMember.Tests.ps1 +++ b/tests/Add-DbaDbRoleMember.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaDbRoleMember" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaDbRoleMember - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 b/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 index 6247711bcc..469b463e7e 100644 --- a/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 +++ b/tests/Add-DbaPfDataCollectorCounter.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaPfDataCollectorCounter" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaPfDataCollectorCounter - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Add-DbaRegServerGroup.Tests.ps1 b/tests/Add-DbaRegServerGroup.Tests.ps1 index 185e81496c..d129d8c02d 100644 --- a/tests/Add-DbaRegServerGroup.Tests.ps1 +++ b/tests/Add-DbaRegServerGroup.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaRegServerGroup" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaRegServerGroup - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Add-DbaReplArticle.Tests.ps1 b/tests/Add-DbaReplArticle.Tests.ps1 index 95fe1d2f64..925db18e93 100644 --- a/tests/Add-DbaReplArticle.Tests.ps1 +++ b/tests/Add-DbaReplArticle.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Add-DbaReplArticle" -Tag "UnitTests" { BeforeAll { $command = Get-Command Add-DbaReplArticle - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Backup-DbaComputerCertificate.Tests.ps1 b/tests/Backup-DbaComputerCertificate.Tests.ps1 index eac6a6070a..bcc448b445 100644 --- a/tests/Backup-DbaComputerCertificate.Tests.ps1 +++ b/tests/Backup-DbaComputerCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaComputerCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaComputerCertificate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SecurePassword", "InputObject", diff --git a/tests/Backup-DbaDbCertificate.Tests.ps1 b/tests/Backup-DbaDbCertificate.Tests.ps1 index f6fa55d1df..381d9d0cc3 100644 --- a/tests/Backup-DbaDbCertificate.Tests.ps1 +++ b/tests/Backup-DbaDbCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaDbCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaDbCertificate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Backup-DbaDbMasterKey.Tests.ps1 b/tests/Backup-DbaDbMasterKey.Tests.ps1 index 546e781d5d..0ce79702b5 100644 --- a/tests/Backup-DbaDbMasterKey.Tests.ps1 +++ b/tests/Backup-DbaDbMasterKey.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaDbMasterKey - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Backup-DbaServiceMasterKey.Tests.ps1 b/tests/Backup-DbaServiceMasterKey.Tests.ps1 index 9079c77135..9e864c5cb1 100644 --- a/tests/Backup-DbaServiceMasterKey.Tests.ps1 +++ b/tests/Backup-DbaServiceMasterKey.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Backup-DbaServiceMasterKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Backup-DbaServiceMasterKey - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Clear-DbaConnectionPool.Tests.ps1 b/tests/Clear-DbaConnectionPool.Tests.ps1 index 0b05c15d78..b0ac15ac32 100644 --- a/tests/Clear-DbaConnectionPool.Tests.ps1 +++ b/tests/Clear-DbaConnectionPool.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaConnectionPool" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaConnectionPool - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Clear-DbaLatchStatistics.Tests.ps1 b/tests/Clear-DbaLatchStatistics.Tests.ps1 index 76e2f50625..7fe0086df7 100644 --- a/tests/Clear-DbaLatchStatistics.Tests.ps1 +++ b/tests/Clear-DbaLatchStatistics.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaLatchStatistics" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaLatchStatistics - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Clear-DbaPlanCache.Tests.ps1 b/tests/Clear-DbaPlanCache.Tests.ps1 index 93359bbd16..8e92b39c17 100644 --- a/tests/Clear-DbaPlanCache.Tests.ps1 +++ b/tests/Clear-DbaPlanCache.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaPlanCache" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaPlanCache - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Clear-DbaWaitStatistics.Tests.ps1 b/tests/Clear-DbaWaitStatistics.Tests.ps1 index 65b90477a4..439ff74dca 100644 --- a/tests/Clear-DbaWaitStatistics.Tests.ps1 +++ b/tests/Clear-DbaWaitStatistics.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Clear-DbaWaitStatistics" -Tag "UnitTests" { BeforeAll { $command = Get-Command Clear-DbaWaitStatistics - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Convert-DbaLsn.Tests.ps1 b/tests/Convert-DbaLsn.Tests.ps1 index d0be494a25..13cd2de08f 100644 --- a/tests/Convert-DbaLsn.Tests.ps1 +++ b/tests/Convert-DbaLsn.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Convert-DbaLSN" -Tag "UnitTests" { BeforeAll { $command = Get-Command Convert-DbaLSN - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "LSN", "EnableException" diff --git a/tests/Convert-DbaMaskingValue.Tests.ps1 b/tests/Convert-DbaMaskingValue.Tests.ps1 index f792940e98..785978a3b8 100644 --- a/tests/Convert-DbaMaskingValue.Tests.ps1 +++ b/tests/Convert-DbaMaskingValue.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Convert-DbaMaskingValue" -Tag "UnitTests" { BeforeAll { $command = Get-Command Convert-DbaMaskingValue - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Value", "DataType", diff --git a/tests/ConvertTo-DbaTimeline.Tests.ps1 b/tests/ConvertTo-DbaTimeline.Tests.ps1 index 35fa27d9e0..fed94cba62 100644 --- a/tests/ConvertTo-DbaTimeline.Tests.ps1 +++ b/tests/ConvertTo-DbaTimeline.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "ConvertTo-DbaTimeline" -Tag "UnitTests" { BeforeAll { $command = Get-Command ConvertTo-DbaTimeline - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "InputObject", "ExcludeRowLabel", diff --git a/tests/ConvertTo-DbaXESession.Tests.ps1 b/tests/ConvertTo-DbaXESession.Tests.ps1 index 51ef3cba8b..656ecc2218 100644 --- a/tests/ConvertTo-DbaXESession.Tests.ps1 +++ b/tests/ConvertTo-DbaXESession.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "ConvertTo-DbaXESession" -Tag "UnitTests" { BeforeAll { $command = Get-Command ConvertTo-DbaXESession - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "InputObject", "Name", diff --git a/tests/Copy-DbaAgentAlert.Tests.ps1 b/tests/Copy-DbaAgentAlert.Tests.ps1 index b8b115d443..9b4b2ff122 100644 --- a/tests/Copy-DbaAgentAlert.Tests.ps1 +++ b/tests/Copy-DbaAgentAlert.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentAlert" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentAlert - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentJob.Tests.ps1 b/tests/Copy-DbaAgentJob.Tests.ps1 index f1504cc7a4..8dc92ea0c8 100644 --- a/tests/Copy-DbaAgentJob.Tests.ps1 +++ b/tests/Copy-DbaAgentJob.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentJob" -Tag "IntegrationTests" { BeforeAll { $command = Get-Command Copy-DbaAgentJob - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentJobCategory.Tests.ps1 b/tests/Copy-DbaAgentJobCategory.Tests.ps1 index 30ff847b61..5eb3b354ec 100644 --- a/tests/Copy-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Copy-DbaAgentJobCategory.Tests.ps1 @@ -8,7 +8,7 @@ Describe "Copy-DbaAgentJobCategory" -Tag "IntegrationTests" { BeforeAll { $command = Get-Command Copy-DbaAgentJobCategory - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", @@ -24,7 +24,7 @@ Describe "Copy-DbaAgentJobCategory" -Tag "IntegrationTests" { "WhatIf" ) } - + AfterAll { $null = Remove-DbaAgentJobCategory -SqlInstance $TestConfig.instance2 -Category 'dbatoolsci test category' -Confirm:$false } diff --git a/tests/Copy-DbaAgentOperator.Tests.ps1 b/tests/Copy-DbaAgentOperator.Tests.ps1 index 12c202ff94..2b2824c439 100644 --- a/tests/Copy-DbaAgentOperator.Tests.ps1 +++ b/tests/Copy-DbaAgentOperator.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentOperator" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentOperator - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentProxy.Tests.ps1 b/tests/Copy-DbaAgentProxy.Tests.ps1 index 51fd7ee939..cb5bcc317a 100644 --- a/tests/Copy-DbaAgentProxy.Tests.ps1 +++ b/tests/Copy-DbaAgentProxy.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentProxy" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentProxy - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentSchedule.Tests.ps1 b/tests/Copy-DbaAgentSchedule.Tests.ps1 index c6db33d464..7bf8192b13 100644 --- a/tests/Copy-DbaAgentSchedule.Tests.ps1 +++ b/tests/Copy-DbaAgentSchedule.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentSchedule" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentSchedule - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaAgentServer.Tests.ps1 b/tests/Copy-DbaAgentServer.Tests.ps1 index 2f5132f4d9..b33c62b17c 100644 --- a/tests/Copy-DbaAgentServer.Tests.ps1 +++ b/tests/Copy-DbaAgentServer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaAgentServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaAgentServer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaBackupDevice.Tests.ps1 b/tests/Copy-DbaBackupDevice.Tests.ps1 index 08ab71c0c2..6619ff437a 100644 --- a/tests/Copy-DbaBackupDevice.Tests.ps1 +++ b/tests/Copy-DbaBackupDevice.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Copy-DbaBackupDevice" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaBackupDevice - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaCustomError.Tests.ps1 b/tests/Copy-DbaCustomError.Tests.ps1 index 506417d0a1..529c21a66a 100644 --- a/tests/Copy-DbaCustomError.Tests.ps1 +++ b/tests/Copy-DbaCustomError.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaCustomError" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaCustomError - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaDataCollector.Tests.ps1 b/tests/Copy-DbaDataCollector.Tests.ps1 index 216185cfdf..bcb0bc2879 100644 --- a/tests/Copy-DbaDataCollector.Tests.ps1 +++ b/tests/Copy-DbaDataCollector.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Copy-DbaDataCollector" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDataCollector - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'Source', 'SourceSqlCredential', diff --git a/tests/Copy-DbaDbCertificate.Tests.ps1 b/tests/Copy-DbaDbCertificate.Tests.ps1 index a8f1f8b7ba..05ef7d7349 100644 --- a/tests/Copy-DbaDbCertificate.Tests.ps1 +++ b/tests/Copy-DbaDbCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaDbCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDbCertificate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'Source', 'SourceSqlCredential', @@ -41,13 +41,13 @@ Describe "Copy-DbaDbCertificate" -Tag "IntegrationTests" { Context "Can create a database certificate" { BeforeAll { $securePassword = ConvertTo-SecureString -String "GoodPass1234!" -AsPlainText -Force - + # Create master key on instance2 $masterKey = New-DbaDbMasterKey -SqlInstance $TestConfig.instance2 -Database master -SecurePassword $securePassword -Confirm:$false -ErrorAction SilentlyContinue # Create test databases $testDatabases = New-DbaDatabase -SqlInstance $TestConfig.instance2, $TestConfig.instance3 -Name dbatoolscopycred - + # Create master key and certificate on source $null = New-DbaDbMasterKey -SqlInstance $TestConfig.instance2 -Database dbatoolscopycred -SecurePassword $securePassword -Confirm:$false $certificateName = "Cert_$(Get-Random)" @@ -74,13 +74,13 @@ Describe "Copy-DbaDbCertificate" -Tag "IntegrationTests" { It -Skip "Successfully copies a certificate" { $results = Copy-DbaDbCertificate @splatCopyCert | Where-Object SourceDatabase -eq dbatoolscopycred | Select-Object -First 1 - + $results.Notes | Should -BeNullOrEmpty $results.Status | Should -Be "Successful" - + $sourceDb = Get-DbaDatabase -SqlInstance $TestConfig.instance2 -Database dbatoolscopycred $destDb = Get-DbaDatabase -SqlInstance $TestConfig.instance3 -Database dbatoolscopycred - + $results.SourceDatabaseID | Should -Be $sourceDb.ID $results.DestinationDatabaseID | Should -Be $destDb.ID diff --git a/tests/Copy-DbaDbMail.Tests.ps1 b/tests/Copy-DbaDbMail.Tests.ps1 index ee5abb6666..c9de445b5b 100644 --- a/tests/Copy-DbaDbMail.Tests.ps1 +++ b/tests/Copy-DbaDbMail.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaDbMail" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDbMail - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "Destination", diff --git a/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 b/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 index e2ecf2b40a..3c565f9b3c 100644 --- a/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 +++ b/tests/Copy-DbaDbQueryStoreOption.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Copy-DbaDbQueryStoreOption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaDbQueryStoreOption - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaDbTableData.Tests.ps1 b/tests/Copy-DbaDbTableData.Tests.ps1 index 6646acd3e4..b57f1f0547 100644 --- a/tests/Copy-DbaDbTableData.Tests.ps1 +++ b/tests/Copy-DbaDbTableData.Tests.ps1 @@ -8,7 +8,7 @@ Describe "Copy-DbaDbTableData" -Tag "UnitTests" { Context "Parameter validation" { BeforeAll { $command = Get-Command Copy-DbaDbTableData - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Copy-DbaEndpoint.Tests.ps1 b/tests/Copy-DbaEndpoint.Tests.ps1 index 27a6be9fff..d8d5fc7a1b 100644 --- a/tests/Copy-DbaEndpoint.Tests.ps1 +++ b/tests/Copy-DbaEndpoint.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaEndpoint" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaEndpoint - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaInstanceAudit.Tests.ps1 b/tests/Copy-DbaInstanceAudit.Tests.ps1 index a315a75df6..182ccd2927 100644 --- a/tests/Copy-DbaInstanceAudit.Tests.ps1 +++ b/tests/Copy-DbaInstanceAudit.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaInstanceAudit" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaInstanceAudit - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 b/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 index 7d7b7dc123..4d069cad5b 100644 --- a/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 +++ b/tests/Copy-DbaInstanceAuditSpecification.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaInstanceAuditSpecification" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaInstanceAuditSpecification - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaInstanceTrigger.Tests.ps1 b/tests/Copy-DbaInstanceTrigger.Tests.ps1 index 246f74e78d..08261ca0f7 100644 --- a/tests/Copy-DbaInstanceTrigger.Tests.ps1 +++ b/tests/Copy-DbaInstanceTrigger.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaInstanceTrigger" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaInstanceTrigger - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'Source', 'SourceSqlCredential', diff --git a/tests/Copy-DbaLinkedServer.Tests.ps1 b/tests/Copy-DbaLinkedServer.Tests.ps1 index 930cfc77ed..6745c4ddf7 100644 --- a/tests/Copy-DbaLinkedServer.Tests.ps1 +++ b/tests/Copy-DbaLinkedServer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaLinkedServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaLinkedServer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaPolicyManagement.Tests.ps1 b/tests/Copy-DbaPolicyManagement.Tests.ps1 index 41a07d3489..5ede7bb692 100644 --- a/tests/Copy-DbaPolicyManagement.Tests.ps1 +++ b/tests/Copy-DbaPolicyManagement.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaPolicyManagement" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaPolicyManagement - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaRegServer.Tests.ps1 b/tests/Copy-DbaRegServer.Tests.ps1 index a8654e2e5f..40a3317f4e 100644 --- a/tests/Copy-DbaRegServer.Tests.ps1 +++ b/tests/Copy-DbaRegServer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaRegServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaRegServer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaResourceGovernor.Tests.ps1 b/tests/Copy-DbaResourceGovernor.Tests.ps1 index d3143cfe6f..923d6dc20b 100644 --- a/tests/Copy-DbaResourceGovernor.Tests.ps1 +++ b/tests/Copy-DbaResourceGovernor.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaResourceGovernor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaResourceGovernor - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaSpConfigure.Tests.ps1 b/tests/Copy-DbaSpConfigure.Tests.ps1 index 2bc20dd9f8..cfb9cc4789 100644 --- a/tests/Copy-DbaSpConfigure.Tests.ps1 +++ b/tests/Copy-DbaSpConfigure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaSpConfigure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaSpConfigure - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaSsisCatalog.Tests.ps1 b/tests/Copy-DbaSsisCatalog.Tests.ps1 index eb23c5ae0f..60fe65581e 100644 --- a/tests/Copy-DbaSsisCatalog.Tests.ps1 +++ b/tests/Copy-DbaSsisCatalog.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaSsisCatalog" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaSsisCatalog - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "Destination", diff --git a/tests/Copy-DbaStartupProcedure.Tests.ps1 b/tests/Copy-DbaStartupProcedure.Tests.ps1 index 75a552733c..f51baa80de 100644 --- a/tests/Copy-DbaStartupProcedure.Tests.ps1 +++ b/tests/Copy-DbaStartupProcedure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaStartupProcedure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaStartupProcedure - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'Source', 'SourceSqlCredential', diff --git a/tests/Copy-DbaSystemDbUserObject.Tests.ps1 b/tests/Copy-DbaSystemDbUserObject.Tests.ps1 index 4fe038ec2e..ac76af2ebc 100644 --- a/tests/Copy-DbaSystemDbUserObject.Tests.ps1 +++ b/tests/Copy-DbaSystemDbUserObject.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaSystemDbUserObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaSystemDbUserObject - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "SourceSqlCredential", diff --git a/tests/Copy-DbaXESession.Tests.ps1 b/tests/Copy-DbaXESession.Tests.ps1 index e5e2d9f298..334f2c2399 100644 --- a/tests/Copy-DbaXESession.Tests.ps1 +++ b/tests/Copy-DbaXESession.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaXESession" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaXESession - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Source", "Destination", diff --git a/tests/Copy-DbaXESessionTemplate.Tests.ps1 b/tests/Copy-DbaXESessionTemplate.Tests.ps1 index a6d24e63d8..c1499ba27e 100644 --- a/tests/Copy-DbaXESessionTemplate.Tests.ps1 +++ b/tests/Copy-DbaXESessionTemplate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Copy-DbaXESessionTemplate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Copy-DbaXESessionTemplate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "Path", "Destination", diff --git a/tests/Disable-DbaAgHadr.Tests.ps1 b/tests/Disable-DbaAgHadr.Tests.ps1 index 93e430916e..d0a9bffb74 100644 --- a/tests/Disable-DbaAgHadr.Tests.ps1 +++ b/tests/Disable-DbaAgHadr.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaAgHadr" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaAgHadr - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Disable-DbaDbEncryption.Tests.ps1 b/tests/Disable-DbaDbEncryption.Tests.ps1 index da3c336e96..8fca2d5c83 100644 --- a/tests/Disable-DbaDbEncryption.Tests.ps1 +++ b/tests/Disable-DbaDbEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaDbEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaDbEncryption - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 b/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 index a323b8937c..abbdb98a02 100644 --- a/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Disable-DbaForceNetworkEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaForceNetworkEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaForceNetworkEncryption - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Disable-DbaHideInstance.Tests.ps1 b/tests/Disable-DbaHideInstance.Tests.ps1 index 217d4dc306..91550a48eb 100644 --- a/tests/Disable-DbaHideInstance.Tests.ps1 +++ b/tests/Disable-DbaHideInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaHideInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaHideInstance - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Disable-DbaReplDistributor.Tests.ps1 b/tests/Disable-DbaReplDistributor.Tests.ps1 index 89fd7b6d56..5fcb683ae5 100644 --- a/tests/Disable-DbaReplDistributor.Tests.ps1 +++ b/tests/Disable-DbaReplDistributor.Tests.ps1 @@ -11,7 +11,7 @@ Add-ReplicationLibrary Describe "Disable-DbaReplDistributor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaReplDistributor - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaReplPublishing.Tests.ps1 b/tests/Disable-DbaReplPublishing.Tests.ps1 index 4acaf31dbd..7b63602781 100644 --- a/tests/Disable-DbaReplPublishing.Tests.ps1 +++ b/tests/Disable-DbaReplPublishing.Tests.ps1 @@ -9,7 +9,7 @@ Add-ReplicationLibrary Describe "Disable-DbaReplPublishing" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaReplPublishing - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaStartupProcedure.Tests.ps1 b/tests/Disable-DbaStartupProcedure.Tests.ps1 index 51a43ec833..cb62f4e3ec 100644 --- a/tests/Disable-DbaStartupProcedure.Tests.ps1 +++ b/tests/Disable-DbaStartupProcedure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaStartupProcedure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaStartupProcedure - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disable-DbaTraceFlag.Tests.ps1 b/tests/Disable-DbaTraceFlag.Tests.ps1 index 60f7774bab..3954f17521 100644 --- a/tests/Disable-DbaTraceFlag.Tests.ps1 +++ b/tests/Disable-DbaTraceFlag.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disable-DbaTraceFlag" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disable-DbaTraceFlag - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Disconnect-DbaInstance.Tests.ps1 b/tests/Disconnect-DbaInstance.Tests.ps1 index 6eee476828..5816f38aaa 100644 --- a/tests/Disconnect-DbaInstance.Tests.ps1 +++ b/tests/Disconnect-DbaInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Disconnect-DbaInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Disconnect-DbaInstance - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "InputObject", "EnableException", diff --git a/tests/Dismount-DbaDatabase.Tests.ps1 b/tests/Dismount-DbaDatabase.Tests.ps1 index f6054274e0..fabede8371 100644 --- a/tests/Dismount-DbaDatabase.Tests.ps1 +++ b/tests/Dismount-DbaDatabase.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Dismount-DbaDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Dismount-DbaDatabase - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaAgHadr.Tests.ps1 b/tests/Enable-DbaAgHadr.Tests.ps1 index 4cd12c0800..6b892bc729 100644 --- a/tests/Enable-DbaAgHadr.Tests.ps1 +++ b/tests/Enable-DbaAgHadr.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaAgHadr" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaAgHadr - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Enable-DbaDbEncryption.Tests.ps1 b/tests/Enable-DbaDbEncryption.Tests.ps1 index 6a4f8bea47..927afd7b9f 100644 --- a/tests/Enable-DbaDbEncryption.Tests.ps1 +++ b/tests/Enable-DbaDbEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaDbEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaDbEncryption - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaFilestream.Tests.ps1 b/tests/Enable-DbaFilestream.Tests.ps1 index 4b893c1ebc..944ff6c940 100644 --- a/tests/Enable-DbaFilestream.Tests.ps1 +++ b/tests/Enable-DbaFilestream.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaFilestream" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaFilestream - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", @@ -37,7 +37,7 @@ Describe "Enable-DbaFilestream" -Tag "IntegrationTests" { BeforeAll { $global:OriginalFileStream = Get-DbaFilestream -SqlInstance $TestConfig.instance1 } - + AfterAll { if ($global:OriginalFileStream.InstanceAccessLevel -eq 0) { Disable-DbaFilestream -SqlInstance $TestConfig.instance1 -Confirm:$false diff --git a/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 b/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 index 5e2d8ec7f8..0147133461 100644 --- a/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 +++ b/tests/Enable-DbaForceNetworkEncryption.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaForceNetworkEncryption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaForceNetworkEncryption - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Enable-DbaHideInstance.Tests.ps1 b/tests/Enable-DbaHideInstance.Tests.ps1 index 7348cb7078..a2b4885226 100644 --- a/tests/Enable-DbaHideInstance.Tests.ps1 +++ b/tests/Enable-DbaHideInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaHideInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaHideInstance - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Credential", diff --git a/tests/Enable-DbaReplDistributor.Tests.ps1 b/tests/Enable-DbaReplDistributor.Tests.ps1 index 05b14deeba..c86a5fca21 100644 --- a/tests/Enable-DbaReplDistributor.Tests.ps1 +++ b/tests/Enable-DbaReplDistributor.Tests.ps1 @@ -9,7 +9,7 @@ Add-ReplicationLibrary Describe "Enable-DbaReplDistributor" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaReplDistributor - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaReplPublishing.Tests.ps1 b/tests/Enable-DbaReplPublishing.Tests.ps1 index fca3e6233b..b72e9a2724 100644 --- a/tests/Enable-DbaReplPublishing.Tests.ps1 +++ b/tests/Enable-DbaReplPublishing.Tests.ps1 @@ -9,7 +9,7 @@ Add-ReplicationLibrary Describe "Enable-DbaReplPublishing" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaReplPublishing - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Enable-DbaTraceFlag.Tests.ps1 b/tests/Enable-DbaTraceFlag.Tests.ps1 index a6c79891e6..19ea7ed5e1 100644 --- a/tests/Enable-DbaTraceFlag.Tests.ps1 +++ b/tests/Enable-DbaTraceFlag.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Enable-DbaTraceFlag" -Tag "UnitTests" { BeforeAll { $command = Get-Command Enable-DbaTraceFlag - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Expand-DbaDbLogFile.Tests.ps1 b/tests/Expand-DbaDbLogFile.Tests.ps1 index 8eebfc483b..0d48d3cf11 100644 --- a/tests/Expand-DbaDbLogFile.Tests.ps1 +++ b/tests/Expand-DbaDbLogFile.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Expand-DbaDbLogFile" -Tag "UnitTests" { BeforeAll { $command = Get-Command Expand-DbaDbLogFile - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Export-DbaBinaryFile.Tests.ps1 b/tests/Export-DbaBinaryFile.Tests.ps1 index 40d342d48c..a734aa8814 100644 --- a/tests/Export-DbaBinaryFile.Tests.ps1 +++ b/tests/Export-DbaBinaryFile.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaBinaryFile" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaBinaryFile - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaCredential.Tests.ps1 b/tests/Export-DbaCredential.Tests.ps1 index 8b92201e95..7b97d43bd4 100644 --- a/tests/Export-DbaCredential.Tests.ps1 +++ b/tests/Export-DbaCredential.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaCredential" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaCredential - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "Identity", diff --git a/tests/Export-DbaDacPackage.Tests.ps1 b/tests/Export-DbaDacPackage.Tests.ps1 index cf9154afa9..68fafae28c 100644 --- a/tests/Export-DbaDacPackage.Tests.ps1 +++ b/tests/Export-DbaDacPackage.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaDacPackage" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaDacPackage - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaDbTableData.Tests.ps1 b/tests/Export-DbaDbTableData.Tests.ps1 index 8b6388f97b..3f34dc034b 100644 --- a/tests/Export-DbaDbTableData.Tests.ps1 +++ b/tests/Export-DbaDbTableData.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaDbTableData" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaDbTableData - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'InputObject', 'Path', diff --git a/tests/Export-DbaDiagnosticQuery.Tests.ps1 b/tests/Export-DbaDiagnosticQuery.Tests.ps1 index e6b3a4db11..7487074720 100644 --- a/tests/Export-DbaDiagnosticQuery.Tests.ps1 +++ b/tests/Export-DbaDiagnosticQuery.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaDiagnosticQuery" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaDiagnosticQuery - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "InputObject", "ConvertTo", diff --git a/tests/Export-DbaExecutionPlan.Tests.ps1 b/tests/Export-DbaExecutionPlan.Tests.ps1 index 50e8adb06a..02defe5886 100644 --- a/tests/Export-DbaExecutionPlan.Tests.ps1 +++ b/tests/Export-DbaExecutionPlan.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaExecutionPlan" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaExecutionPlan - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaLinkedServer.Tests.ps1 b/tests/Export-DbaLinkedServer.Tests.ps1 index 2f03652674..140b1fdd54 100644 --- a/tests/Export-DbaLinkedServer.Tests.ps1 +++ b/tests/Export-DbaLinkedServer.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Export-DbaLinkedServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaLinkedServer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "LinkedServer", diff --git a/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 b/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 index dadaa4421e..f2d4069366 100644 --- a/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 +++ b/tests/Export-DbaPfDataCollectorSetTemplate.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaPfDataCollectorSetTemplate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaPfDataCollectorSetTemplate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", - "Credential", + "Credential", "CollectorSet", "Path", "FilePath", diff --git a/tests/Export-DbaRegServer.Tests.ps1 b/tests/Export-DbaRegServer.Tests.ps1 index 90f792f311..847f882da7 100644 --- a/tests/Export-DbaRegServer.Tests.ps1 +++ b/tests/Export-DbaRegServer.Tests.ps1 @@ -8,7 +8,7 @@ Describe "Export-DbaRegServer" -Tag "UnitTests" { Context "Parameter validation" { BeforeAll { $command = Get-Command Export-DbaRegServer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaReplServerSetting.Tests.ps1 b/tests/Export-DbaReplServerSetting.Tests.ps1 index 2bb535472d..a30c126383 100644 --- a/tests/Export-DbaReplServerSetting.Tests.ps1 +++ b/tests/Export-DbaReplServerSetting.Tests.ps1 @@ -11,7 +11,7 @@ Add-ReplicationLibrary Describe "Export-DbaReplServerSetting" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaReplServerSetting - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbaScript.Tests.ps1 b/tests/Export-DbaScript.Tests.ps1 index e167590785..aa14776b6c 100644 --- a/tests/Export-DbaScript.Tests.ps1 +++ b/tests/Export-DbaScript.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaScript" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaScript - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "InputObject", "ScriptingOptionsObject", diff --git a/tests/Export-DbaServerRole.Tests.ps1 b/tests/Export-DbaServerRole.Tests.ps1 index b502afa5f6..430aaa9586 100644 --- a/tests/Export-DbaServerRole.Tests.ps1 +++ b/tests/Export-DbaServerRole.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaServerRole" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaServerRole - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', - 'SqlCredential', + 'SqlCredential', 'InputObject', 'ScriptingOptionsObject', 'ServerRole', @@ -45,7 +45,7 @@ Describe "Export-DbaServerRole" -Tags "IntegrationTests" { BeforeAll { $AltExportPath = "$env:USERPROFILE\Documents" $outputFile = "$AltExportPath\Dbatoolsci_ServerRole.sql" - + $random = Get-Random $login1 = "dbatoolsci_exportdbaserverrole_login1$random" $svRole = "dbatoolsci_ScriptPermissions$random" diff --git a/tests/Export-DbaSpConfigure.Tests.ps1 b/tests/Export-DbaSpConfigure.Tests.ps1 index b029438719..f7e2805e2d 100644 --- a/tests/Export-DbaSpConfigure.Tests.ps1 +++ b/tests/Export-DbaSpConfigure.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaSpConfigure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaSpConfigure - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", - "SqlCredential", + "SqlCredential", "Path", "FilePath", "EnableException" diff --git a/tests/Export-DbaSysDbUserObject.Tests.ps1 b/tests/Export-DbaSysDbUserObject.Tests.ps1 index 55e61f8f2c..07ce5b04ab 100644 --- a/tests/Export-DbaSysDbUserObject.Tests.ps1 +++ b/tests/Export-DbaSysDbUserObject.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaSysDbUserObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaSysDbUserObject - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Export-DbaXECsv.Tests.ps1 b/tests/Export-DbaXECsv.Tests.ps1 index a3c4a29200..fe4e265385 100644 --- a/tests/Export-DbaXECsv.Tests.ps1 +++ b/tests/Export-DbaXECsv.Tests.ps1 @@ -7,10 +7,10 @@ param( Describe "Export-DbaXECsv" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaXECsv - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "InputObject", - "Path", + "Path", "FilePath", "EnableException" ) diff --git a/tests/Export-DbaXESession.Tests.ps1 b/tests/Export-DbaXESession.Tests.ps1 index 9e8f197537..2073206c81 100644 --- a/tests/Export-DbaXESession.Tests.ps1 +++ b/tests/Export-DbaXESession.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Export-DbaXESession" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbaXESession - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Export-DbatoolsConfig.Tests.ps1 b/tests/Export-DbatoolsConfig.Tests.ps1 index a20be041c8..18307e4ebb 100644 --- a/tests/Export-DbatoolsConfig.Tests.ps1 +++ b/tests/Export-DbatoolsConfig.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Export-DbatoolsConfig" -Tag "UnitTests" { BeforeAll { $command = Get-Command Export-DbatoolsConfig - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "FullName", "Module", diff --git a/tests/Find-DbaAgentJob.Tests.ps1 b/tests/Find-DbaAgentJob.Tests.ps1 index ee3b9e3865..f5d17b28f2 100644 --- a/tests/Find-DbaAgentJob.Tests.ps1 +++ b/tests/Find-DbaAgentJob.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaAgentJob" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaAgentJob - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaBackup.Tests.ps1 b/tests/Find-DbaBackup.Tests.ps1 index b02977c555..a44c16cc23 100644 --- a/tests/Find-DbaBackup.Tests.ps1 +++ b/tests/Find-DbaBackup.Tests.ps1 @@ -14,7 +14,7 @@ Describe "Find-DbaBackup" -Tag "UnitTests" { 'CheckArchiveBit' 'EnableException' ) - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $knownParameters + $expected = $TestConfig.CommonParameters + $knownParameters } Context "Parameter validation" { diff --git a/tests/Find-DbaCommand.Tests.ps1 b/tests/Find-DbaCommand.Tests.ps1 index c97bc15f7a..c9cdad6ec7 100644 --- a/tests/Find-DbaCommand.Tests.ps1 +++ b/tests/Find-DbaCommand.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaCommand" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaCommand - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'Pattern', 'Tag', diff --git a/tests/Find-DbaDbDisabledIndex.Tests.ps1 b/tests/Find-DbaDbDisabledIndex.Tests.ps1 index 5aecf2c689..c0644d2ed7 100644 --- a/tests/Find-DbaDbDisabledIndex.Tests.ps1 +++ b/tests/Find-DbaDbDisabledIndex.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaDbDisabledIndex" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbDisabledIndex - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaDbDuplicateIndex.Tests.ps1 b/tests/Find-DbaDbDuplicateIndex.Tests.ps1 index 029bd3c44d..58ca24efb1 100644 --- a/tests/Find-DbaDbDuplicateIndex.Tests.ps1 +++ b/tests/Find-DbaDbDuplicateIndex.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaDbDuplicateIndex" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbDuplicateIndex - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaDbGrowthEvent.Tests.ps1 b/tests/Find-DbaDbGrowthEvent.Tests.ps1 index 5120223b4d..361fca9ee6 100644 --- a/tests/Find-DbaDbGrowthEvent.Tests.ps1 +++ b/tests/Find-DbaDbGrowthEvent.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaDbGrowthEvent" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbGrowthEvent - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaDbUnusedIndex.Tests.ps1 b/tests/Find-DbaDbUnusedIndex.Tests.ps1 index e2cb0f1dff..a04ab63a5b 100644 --- a/tests/Find-DbaDbUnusedIndex.Tests.ps1 +++ b/tests/Find-DbaDbUnusedIndex.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaDbUnusedIndex" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaDbUnusedIndex - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaInstance.Tests.ps1 b/tests/Find-DbaInstance.Tests.ps1 index 2a1e0e0b3e..65c90163d7 100644 --- a/tests/Find-DbaInstance.Tests.ps1 +++ b/tests/Find-DbaInstance.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaInstance - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "DiscoveryType", diff --git a/tests/Find-DbaLoginInGroup.Tests.ps1 b/tests/Find-DbaLoginInGroup.Tests.ps1 index eea5a2a83e..44fc7a322b 100644 --- a/tests/Find-DbaLoginInGroup.Tests.ps1 +++ b/tests/Find-DbaLoginInGroup.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaLoginInGroup" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaLoginInGroup - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaOrphanedFile.Tests.ps1 b/tests/Find-DbaOrphanedFile.Tests.ps1 index 738e21eba1..fc9bef5c19 100644 --- a/tests/Find-DbaOrphanedFile.Tests.ps1 +++ b/tests/Find-DbaOrphanedFile.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaOrphanedFile" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaOrphanedFile - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaSimilarTable.Tests.ps1 b/tests/Find-DbaSimilarTable.Tests.ps1 index 5518f13ce9..f45a1df27e 100644 --- a/tests/Find-DbaSimilarTable.Tests.ps1 +++ b/tests/Find-DbaSimilarTable.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaSimilarTable" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaSimilarTable - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaStoredProcedure.Tests.ps1 b/tests/Find-DbaStoredProcedure.Tests.ps1 index 643ea74659..435ad56b20 100644 --- a/tests/Find-DbaStoredProcedure.Tests.ps1 +++ b/tests/Find-DbaStoredProcedure.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaStoredProcedure" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaStoredProcedure - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaTrigger.Tests.ps1 b/tests/Find-DbaTrigger.Tests.ps1 index 685329523d..5e9222a424 100644 --- a/tests/Find-DbaTrigger.Tests.ps1 +++ b/tests/Find-DbaTrigger.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaTrigger" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaTrigger - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( 'SqlInstance', 'SqlCredential', diff --git a/tests/Find-DbaUserObject.Tests.ps1 b/tests/Find-DbaUserObject.Tests.ps1 index b8b60ac946..a1e652aa54 100644 --- a/tests/Find-DbaUserObject.Tests.ps1 +++ b/tests/Find-DbaUserObject.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Find-DbaUserObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaUserObject - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Find-DbaView.Tests.ps1 b/tests/Find-DbaView.Tests.ps1 index bb894acd1f..d25901910a 100644 --- a/tests/Find-DbaView.Tests.ps1 +++ b/tests/Find-DbaView.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Find-DbaView" -Tag "UnitTests" { BeforeAll { $command = Get-Command Find-DbaView - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgBackupHistory.Tests.ps1 b/tests/Get-DbaAgBackupHistory.Tests.ps1 index d1a13bf533..0b27876f25 100644 --- a/tests/Get-DbaAgBackupHistory.Tests.ps1 +++ b/tests/Get-DbaAgBackupHistory.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgBackupHistory" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgBackupHistory - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgDatabase.Tests.ps1 b/tests/Get-DbaAgDatabase.Tests.ps1 index 5a1269ab03..b6df0137cc 100644 --- a/tests/Get-DbaAgDatabase.Tests.ps1 +++ b/tests/Get-DbaAgDatabase.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgDatabase" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgDatabase - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgHadr.Tests.ps1 b/tests/Get-DbaAgHadr.Tests.ps1 index 37d3a090bf..27cdf1f007 100644 --- a/tests/Get-DbaAgHadr.Tests.ps1 +++ b/tests/Get-DbaAgHadr.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaAgHadr" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgHadr - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgReplica.Tests.ps1 b/tests/Get-DbaAgReplica.Tests.ps1 index f68c99fb94..c87aefcefe 100644 --- a/tests/Get-DbaAgReplica.Tests.ps1 +++ b/tests/Get-DbaAgReplica.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgReplica" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgReplica - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentAlert.Tests.ps1 b/tests/Get-DbaAgentAlert.Tests.ps1 index 07fba45a53..3157f8f2f5 100644 --- a/tests/Get-DbaAgentAlert.Tests.ps1 +++ b/tests/Get-DbaAgentAlert.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentAlert" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentAlert - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentAlertCategory.Tests.ps1 b/tests/Get-DbaAgentAlertCategory.Tests.ps1 index 8a61a1c6cf..f14095aa73 100644 --- a/tests/Get-DbaAgentAlertCategory.Tests.ps1 +++ b/tests/Get-DbaAgentAlertCategory.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentAlertCategory" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentAlertCategory - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentJobCategory.Tests.ps1 b/tests/Get-DbaAgentJobCategory.Tests.ps1 index b8f6113df2..e16356345d 100644 --- a/tests/Get-DbaAgentJobCategory.Tests.ps1 +++ b/tests/Get-DbaAgentJobCategory.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgentJobCategory" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentJobCategory - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentJobStep.Tests.ps1 b/tests/Get-DbaAgentJobStep.Tests.ps1 index 380bb9dbc2..ebb7c05520 100644 --- a/tests/Get-DbaAgentJobStep.Tests.ps1 +++ b/tests/Get-DbaAgentJobStep.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentJobStep" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentJobStep - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentLog.Tests.ps1 b/tests/Get-DbaAgentLog.Tests.ps1 index fe117412f2..d694134caa 100644 --- a/tests/Get-DbaAgentLog.Tests.ps1 +++ b/tests/Get-DbaAgentLog.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgentLog" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentLog - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentOperator.Tests.ps1 b/tests/Get-DbaAgentOperator.Tests.ps1 index 6269c2aaf9..2a91098a81 100644 --- a/tests/Get-DbaAgentOperator.Tests.ps1 +++ b/tests/Get-DbaAgentOperator.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaAgentOperator" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentOperator - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentProxy.Tests.ps1 b/tests/Get-DbaAgentProxy.Tests.ps1 index 9506de1761..ae1655a748 100644 --- a/tests/Get-DbaAgentProxy.Tests.ps1 +++ b/tests/Get-DbaAgentProxy.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAgentProxy" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentProxy - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAgentServer.Tests.ps1 b/tests/Get-DbaAgentServer.Tests.ps1 index 6aba3af792..94e139ae05 100644 --- a/tests/Get-DbaAgentServer.Tests.ps1 +++ b/tests/Get-DbaAgentServer.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaAgentServer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAgentServer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAvailabilityGroup.Tests.ps1 b/tests/Get-DbaAvailabilityGroup.Tests.ps1 index 8e1497daaf..ec7adf48aa 100644 --- a/tests/Get-DbaAvailabilityGroup.Tests.ps1 +++ b/tests/Get-DbaAvailabilityGroup.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaAvailabilityGroup" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAvailabilityGroup - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaAvailableCollation.Tests.ps1 b/tests/Get-DbaAvailableCollation.Tests.ps1 index fee137ae59..3fe2c828b8 100644 --- a/tests/Get-DbaAvailableCollation.Tests.ps1 +++ b/tests/Get-DbaAvailableCollation.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaAvailableCollation" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaAvailableCollation - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaBackupDevice.Tests.ps1 b/tests/Get-DbaBackupDevice.Tests.ps1 index 06af8b1d11..e96cb69b98 100644 --- a/tests/Get-DbaBackupDevice.Tests.ps1 +++ b/tests/Get-DbaBackupDevice.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaBackupDevice" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaBackupDevice - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaBinaryFileTable.Tests.ps1 b/tests/Get-DbaBinaryFileTable.Tests.ps1 index 53ed4e974b..106703e0f7 100644 --- a/tests/Get-DbaBinaryFileTable.Tests.ps1 +++ b/tests/Get-DbaBinaryFileTable.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaBinaryFileTable" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaBinaryFileTable - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaClientAlias.Tests.ps1 b/tests/Get-DbaClientAlias.Tests.ps1 index 0d6665ece6..1efa7b89b6 100644 --- a/tests/Get-DbaClientAlias.Tests.ps1 +++ b/tests/Get-DbaClientAlias.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaClientAlias" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaClientAlias - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaClientProtocol.Tests.ps1 b/tests/Get-DbaClientProtocol.Tests.ps1 index a79838303a..e6e8faace2 100644 --- a/tests/Get-DbaClientProtocol.Tests.ps1 +++ b/tests/Get-DbaClientProtocol.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaClientProtocol" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaClientProtocol - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaCmConnection.Tests.ps1 b/tests/Get-DbaCmConnection.Tests.ps1 index 2466e68f68..c038633bf1 100644 --- a/tests/Get-DbaCmConnection.Tests.ps1 +++ b/tests/Get-DbaCmConnection.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaCmConnection" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCmConnection - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "UserName", diff --git a/tests/Get-DbaCmObject.Tests.ps1 b/tests/Get-DbaCmObject.Tests.ps1 index ba00ab61f0..7b9b31baf1 100644 --- a/tests/Get-DbaCmObject.Tests.ps1 +++ b/tests/Get-DbaCmObject.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaCmObject" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCmObject - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ClassName", "Query", diff --git a/tests/Get-DbaComputerCertificate.Tests.ps1 b/tests/Get-DbaComputerCertificate.Tests.ps1 index ec56fff901..ba93f976a5 100644 --- a/tests/Get-DbaComputerCertificate.Tests.ps1 +++ b/tests/Get-DbaComputerCertificate.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaComputerCertificate" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaComputerCertificate - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaComputerSystem.Tests.ps1 b/tests/Get-DbaComputerSystem.Tests.ps1 index 968dd93f52..7ccfb0e85e 100644 --- a/tests/Get-DbaComputerSystem.Tests.ps1 +++ b/tests/Get-DbaComputerSystem.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaComputerSystem" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaComputerSystem - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "ComputerName", "Credential", diff --git a/tests/Get-DbaConnectedInstance.Tests.ps1 b/tests/Get-DbaConnectedInstance.Tests.ps1 index 79baf374a5..cf148499c6 100644 --- a/tests/Get-DbaConnectedInstance.Tests.ps1 +++ b/tests/Get-DbaConnectedInstance.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaConnectedInstance" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaConnectedInstance - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters } Context "Parameter validation" { diff --git a/tests/Get-DbaConnection.Tests.ps1 b/tests/Get-DbaConnection.Tests.ps1 index bdc5adc127..ae45f8e702 100644 --- a/tests/Get-DbaConnection.Tests.ps1 +++ b/tests/Get-DbaConnection.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaConnection" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaConnection - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaCpuRingBuffer.Tests.ps1 b/tests/Get-DbaCpuRingBuffer.Tests.ps1 index a95ee028ec..bae173c093 100644 --- a/tests/Get-DbaCpuRingBuffer.Tests.ps1 +++ b/tests/Get-DbaCpuRingBuffer.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandpath" -ForegroundColor Cyan Describe "Get-DbaCpuRingBuffer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCpuRingBuffer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaCpuUsage.Tests.ps1 b/tests/Get-DbaCpuUsage.Tests.ps1 index 0f6d37d375..d34a42aa88 100644 --- a/tests/Get-DbaCpuUsage.Tests.ps1 +++ b/tests/Get-DbaCpuUsage.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaCpuUsage" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCpuUsage - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaCredential.Tests.ps1 b/tests/Get-DbaCredential.Tests.ps1 index ae4c67f0c6..a02958a1c5 100644 --- a/tests/Get-DbaCredential.Tests.ps1 +++ b/tests/Get-DbaCredential.Tests.ps1 @@ -19,7 +19,7 @@ Describe "Get-DbaCredential" -Tag "UnitTests" { 'ExcludeIdentity', 'EnableException' ) - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $knownParameters + $expected = $TestConfig.CommonParameters + $knownParameters } Context "Parameter validation" { diff --git a/tests/Get-DbaCustomError.Tests.ps1 b/tests/Get-DbaCustomError.Tests.ps1 index 647f431352..8761e87011 100644 --- a/tests/Get-DbaCustomError.Tests.ps1 +++ b/tests/Get-DbaCustomError.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaCustomError" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaCustomError - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbAssembly.Tests.ps1 b/tests/Get-DbaDbAssembly.Tests.ps1 index 1c8ef36adc..d1c49b5e2e 100644 --- a/tests/Get-DbaDbAssembly.Tests.ps1 +++ b/tests/Get-DbaDbAssembly.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbAssembly" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbAssembly - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbAsymmetricKey.Tests.ps1 b/tests/Get-DbaDbAsymmetricKey.Tests.ps1 index dd1729dec0..75ef68e301 100644 --- a/tests/Get-DbaDbAsymmetricKey.Tests.ps1 +++ b/tests/Get-DbaDbAsymmetricKey.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbAsymmetricKey" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbAsymmetricKey - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbCertificate.Tests.ps1 b/tests/Get-DbaDbCertificate.Tests.ps1 index 522979882b..c847a04354 100644 --- a/tests/Get-DbaDbCertificate.Tests.ps1 +++ b/tests/Get-DbaDbCertificate.Tests.ps1 @@ -17,7 +17,7 @@ Describe "Get-DbaDbCertificate" -Tag "UnitTests" { 'InputObject' 'EnableException' ) - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $knownParameters + $expected = $TestConfig.CommonParameters + $knownParameters } Context "Parameter validation" { diff --git a/tests/Get-DbaDbCheckConstraint.Tests.ps1 b/tests/Get-DbaDbCheckConstraint.Tests.ps1 index dd09863736..a99b49fa33 100644 --- a/tests/Get-DbaDbCheckConstraint.Tests.ps1 +++ b/tests/Get-DbaDbCheckConstraint.Tests.ps1 @@ -10,7 +10,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbCheckConstraint" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbCheckConstraint - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbCompatibility.Tests.ps1 b/tests/Get-DbaDbCompatibility.Tests.ps1 index 8d22ffd07f..e3bde56882 100644 --- a/tests/Get-DbaDbCompatibility.Tests.ps1 +++ b/tests/Get-DbaDbCompatibility.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbCompatibility" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbCompatibility - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbCompression.Tests.ps1 b/tests/Get-DbaDbCompression.Tests.ps1 index 4bb1e19ce6..39f8830e35 100644 --- a/tests/Get-DbaDbCompression.Tests.ps1 +++ b/tests/Get-DbaDbCompression.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbCompression" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbCompression - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbDbccOpenTran.Tests.ps1 b/tests/Get-DbaDbDbccOpenTran.Tests.ps1 index 881eed1eff..51a916eeda 100644 --- a/tests/Get-DbaDbDbccOpenTran.Tests.ps1 +++ b/tests/Get-DbaDbDbccOpenTran.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbDbccOpenTran" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbDbccOpenTran - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 b/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 index 4e859bb4a6..43fab3f5e7 100644 --- a/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 +++ b/tests/Get-DbaDbDetachedFileInfo.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbDetachedFileInfo" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbDetachedFileInfo - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccHelp.Tests.ps1 b/tests/Get-DbaDbccHelp.Tests.ps1 index 8eb34ecba2..d3a05e263e 100644 --- a/tests/Get-DbaDbccHelp.Tests.ps1 +++ b/tests/Get-DbaDbccHelp.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccHelp" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccHelp - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccMemoryStatus.Tests.ps1 b/tests/Get-DbaDbccMemoryStatus.Tests.ps1 index 7faad26efb..873f1b6511 100644 --- a/tests/Get-DbaDbccMemoryStatus.Tests.ps1 +++ b/tests/Get-DbaDbccMemoryStatus.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccMemoryStatus" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccMemoryStatus - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccProcCache.Tests.ps1 b/tests/Get-DbaDbccProcCache.Tests.ps1 index 5157f2e0c9..d148f6b017 100644 --- a/tests/Get-DbaDbccProcCache.Tests.ps1 +++ b/tests/Get-DbaDbccProcCache.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccProcCache" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccProcCache - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccSessionBuffer.Tests.ps1 b/tests/Get-DbaDbccSessionBuffer.Tests.ps1 index 71ddab1fe7..61538a8f3e 100644 --- a/tests/Get-DbaDbccSessionBuffer.Tests.ps1 +++ b/tests/Get-DbaDbccSessionBuffer.Tests.ps1 @@ -7,7 +7,7 @@ param( Describe "Get-DbaDbccSessionBuffer" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccSessionBuffer - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccStatistic.Tests.ps1 b/tests/Get-DbaDbccStatistic.Tests.ps1 index 9a2a3d669a..ca090afce1 100644 --- a/tests/Get-DbaDbccStatistic.Tests.ps1 +++ b/tests/Get-DbaDbccStatistic.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccStatistic" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccStatistic - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential", diff --git a/tests/Get-DbaDbccUserOption.Tests.ps1 b/tests/Get-DbaDbccUserOption.Tests.ps1 index 7e66593f76..93a75ff31a 100644 --- a/tests/Get-DbaDbccUserOption.Tests.ps1 +++ b/tests/Get-DbaDbccUserOption.Tests.ps1 @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan Describe "Get-DbaDbccUserOption" -Tag "UnitTests" { BeforeAll { $command = Get-Command Get-DbaDbccUserOption - $expected = [System.Management.Automation.PSCmdlet]::CommonParameters + $expected = $TestConfig.CommonParameters $expected += @( "SqlInstance", "SqlCredential",