Skip to content

Commit 403439c

Browse files
authored
Fix tests to redirect output streams correctly (#2100)
1 parent 6e9ed37 commit 403439c

File tree

146 files changed

+147
-146
lines changed

Some content is hidden

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

146 files changed

+147
-146
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ BeforeDiscovery {
238238
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
239239
{
240240
# Redirect all streams to $null, except the error stream (stream 2)
241-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
241+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
242242
}
243243
244244
# If the dependencies has not been resolved, this will throw an error.
@@ -319,7 +319,7 @@ BeforeDiscovery {
319319
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
320320
{
321321
# Redirect all streams to $null, except the error stream (stream 2)
322-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
322+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
323323
}
324324
325325
# If the dependencies has not been resolved, this will throw an error.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8383

8484
- Fixed workaround for the GitHub Actions to support building module in Windows
8585
PowerShell.
86+
- Fix tests to redirect output streams correctly.
8687
- SqlServerDsc
8788
- Fix localization tests.
8889
- Cleanup in unit tests for classes.

tests/Integration/Commands/Connect-SqlDscDatabaseEngine.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Get-SqlDscInstalledInstance.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Get-SqlDscRSSetupConfiguration.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Install-SqlDscBIReportServer.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Install-SqlDscReportingService.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Install-SqlDscServer.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Prerequisites.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

tests/Integration/Commands/Repair-SqlDscBIReportServer.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BeforeDiscovery {
1010
if (-not (Get-Module -Name 'DscResource.Test' -ListAvailable))
1111
{
1212
# Redirect all streams to $null, except the error stream (stream 2)
13-
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 2>&1 4>&1 5>&1 6>&1 > $null
13+
& "$PSScriptRoot/../../../build.ps1" -Tasks 'noop' 3>&1 4>&1 5>&1 6>&1 > $null
1414
}
1515

1616
# If the dependencies has not been resolved, this will throw an error.

0 commit comments

Comments
 (0)