Skip to content

Commit 61e6fbc

Browse files
committed
Fix environment variable handling in Set-SqlDscConfigurationOption tests
1 parent 339901b commit 61e6fbc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/Unit/Public/Set-SqlDscConfigurationOption.Tests.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ BeforeDiscovery {
2424
}
2525

2626
BeforeAll {
27+
$env:SqlServerDscCI = $true
28+
2729
$script:dscModuleName = 'SqlServerDsc'
2830

2931
Import-Module -Name $script:dscModuleName -Force -ErrorAction 'Stop'
@@ -41,6 +43,8 @@ AfterAll {
4143

4244
# Unload the module being tested so that it doesn't impact any other tests.
4345
Get-Module -Name $script:dscModuleName -All | Remove-Module -Force
46+
47+
Remove-Item -Path 'Env:\SqlServerDscCI' -ErrorAction 'SilentlyContinue'
4448
}
4549

4650
Describe 'Set-SqlDscConfigurationOption' -Tag 'Public' {

0 commit comments

Comments
 (0)