Skip to content

Commit 9bba34b

Browse files
Remove redundant global variable (#9785)
1 parent c92da07 commit 9bba34b

File tree

326 files changed

+59
-1172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+59
-1172
lines changed

tests/Find-DbaBackup.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaCommand.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaDbDisabledIndex.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaDbDuplicateIndex.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaLoginInGroup.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaSimilarTable.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaStoredProcedure.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaTrigger.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Find-DbaView.Tests.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ param(
55
$PSDefaultParameterValues = $TestConfig.Defaults
66
)
77

8-
Write-Host -Object "Running $PSCommandPath" -ForegroundColor Cyan
9-
$global:TestConfig = Get-TestConfig
10-
118
Describe $CommandName -Tag UnitTests {
129
Context "Parameter validation" {
1310
It "Should have the expected parameters" {

tests/Format-DbaBackupInformation.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' {
77
[object[]]$params = (Get-Command $CommandName).Parameters.Keys | Where-Object { $_ -notin ('whatif', 'confirm') }
88
[object[]]$knownParameters = 'BackupHistory', 'ReplaceDatabaseName', 'ReplaceDbNameInFile', 'DataFileDirectory', 'LogFileDirectory', 'DestinationFileStreamDirectory', 'DatabaseNamePrefix', 'DatabaseFilePrefix', 'DatabaseFileSuffix', 'RebaseBackupFolder', 'Continue', 'FileMapping', 'PathSep', 'EnableException'
99
$knownParameters += [System.Management.Automation.PSCmdlet]::CommonParameters
10-
It "Should only contain our specific parameters" {
10+
It "Should have the expected parameters" {
1111
(@(Compare-Object -ReferenceObject ($knownParameters | Where-Object { $_ }) -DifferenceObject $params).Count ) | Should Be 0
1212
}
1313
}

0 commit comments

Comments
 (0)