Skip to content

Commit

Permalink
maybe this will provide more reliable test results
Browse files Browse the repository at this point in the history
if not, im typing them manually
  • Loading branch information
potatoqualitee committed Oct 28, 2024
1 parent c3e390c commit 98b3745
Show file tree
Hide file tree
Showing 144 changed files with 157 additions and 157 deletions.
4 changes: 2 additions & 2 deletions .aider/aider.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function Repair-SmallThing {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Backup-DbaDbMasterKey
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand All @@ -320,7 +320,7 @@ function Repair-SmallThing {
Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Backup-DbaDbMasterKey
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion .aider/prompts/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Describe "Add-DbaAgReplica" -Tag "IntegrationTests" {
Describe "Get-DbaDatabase" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Get-DbaDatabase
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaAgDatabase.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaAgDatabase" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaAgDatabase
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaAgListener.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaAgListener" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaAgListener
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaAgReplica.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaAgReplica" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaAgReplica
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaComputerCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaComputerCertificate" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaComputerCertificate
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"ComputerName",
"Credential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaDbMirrorMonitor.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaDbMirrorMonitor" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaDbMirrorMonitor
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaDbRoleMember.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaDbRoleMember" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaDbRoleMember
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaPfDataCollectorCounter.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaPfDataCollectorCounter" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaPfDataCollectorCounter
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"ComputerName",
"Credential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaRegServerGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaRegServerGroup" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaRegServerGroup
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Add-DbaReplArticle.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Add-DbaReplArticle" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Add-DbaReplArticle
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Backup-DbaComputerCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Backup-DbaComputerCertificate" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Backup-DbaComputerCertificate
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SecurePassword",
"InputObject",
Expand Down
2 changes: 1 addition & 1 deletion tests/Backup-DbaDbCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Backup-DbaDbCertificate" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Backup-DbaDbCertificate
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Backup-DbaDbMasterKey.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Backup-DbaDbMasterKey" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Backup-DbaDbMasterKey
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Backup-DbaServiceMasterKey.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Backup-DbaServiceMasterKey" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Backup-DbaServiceMasterKey
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Clear-DbaConnectionPool.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Clear-DbaConnectionPool" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Clear-DbaConnectionPool
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"ComputerName",
"Credential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Clear-DbaLatchStatistics.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Clear-DbaLatchStatistics" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Clear-DbaLatchStatistics
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Clear-DbaPlanCache.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Clear-DbaPlanCache" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Clear-DbaPlanCache
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Clear-DbaWaitStatistics.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Clear-DbaWaitStatistics" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Clear-DbaWaitStatistics
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"SqlInstance",
"SqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Convert-DbaLsn.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Convert-DbaLSN" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Convert-DbaLSN
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"LSN",
"EnableException"
Expand Down
2 changes: 1 addition & 1 deletion tests/Convert-DbaMaskingValue.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Convert-DbaMaskingValue" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Convert-DbaMaskingValue
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Value",
"DataType",
Expand Down
2 changes: 1 addition & 1 deletion tests/ConvertTo-DbaTimeline.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "ConvertTo-DbaTimeline" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command ConvertTo-DbaTimeline
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"InputObject",
"ExcludeRowLabel",
Expand Down
2 changes: 1 addition & 1 deletion tests/ConvertTo-DbaXESession.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "ConvertTo-DbaXESession" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command ConvertTo-DbaXESession
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"InputObject",
"Name",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaAgentAlert.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaAgentAlert" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentAlert
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaAgentJob.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaAgentJob" -Tag "IntegrationTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentJob
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
4 changes: 2 additions & 2 deletions tests/Copy-DbaAgentJobCategory.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Describe "Copy-DbaAgentJobCategory" -Tag "IntegrationTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentJobCategory

$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand All @@ -24,7 +24,7 @@ Describe "Copy-DbaAgentJobCategory" -Tag "IntegrationTests" {
"WhatIf"
)
}

AfterAll {
$null = Remove-DbaAgentJobCategory -SqlInstance $TestConfig.instance2 -Category 'dbatoolsci test category' -Confirm:$false
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaAgentOperator.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaAgentOperator" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentOperator
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaAgentProxy.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaAgentProxy" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentProxy
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaAgentSchedule.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaAgentSchedule" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentSchedule
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaAgentServer.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaAgentServer" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaAgentServer
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaBackupDevice.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
Describe "Copy-DbaBackupDevice" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaBackupDevice
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaCustomError.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaCustomError" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaCustomError
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaDataCollector.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
Describe "Copy-DbaDataCollector" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaDataCollector
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
'Source',
'SourceSqlCredential',
Expand Down
12 changes: 6 additions & 6 deletions tests/Copy-DbaDbCertificate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaDbCertificate" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaDbCertificate
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
'Source',
'SourceSqlCredential',
Expand Down Expand Up @@ -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)"
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaDbMail.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaDbMail" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaDbMail
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"Destination",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaDbQueryStoreOption.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
Describe "Copy-DbaDbQueryStoreOption" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaDbQueryStoreOption
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaDbTableData.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Describe "Copy-DbaDbTableData" -Tag "UnitTests" {
Context "Parameter validation" {
BeforeAll {
$command = Get-Command Copy-DbaDbTableData
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
'SqlInstance',
'SqlCredential',
Expand Down
2 changes: 1 addition & 1 deletion tests/Copy-DbaEndpoint.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param(
Describe "Copy-DbaEndpoint" -Tag "UnitTests" {
BeforeAll {
$command = Get-Command Copy-DbaEndpoint
$expected = $TestConfig.CommonParameters
$expected = [System.Management.Automation.PSCmdlet]::CommonParameters
$expected += @(
"Source",
"SourceSqlCredential",
Expand Down
Loading

0 comments on commit 98b3745

Please sign in to comment.