You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
Tests in 'Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1' appear to be broken (at least) on Windows Server 2019. The problem occurs when the tests try to disable a feature. On my test machine, there is a third Disabled state, DisabledWithPayloadRemoved, which these tests are not looking for.
Executing script C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1
WARNING: There is no operation running currently. Stop will return without any action.
Describing xWindowsOptionalFeatureSet Integration Tests
Context Install two valid Windows optional features
[+] Should be able to retrieve Windows optional feature RSAT-RDS-Tools-Feature before the configuration 2ms
[+] Should have disabled Windows optional feature RSAT-RDS-Tools-Feature before the configuration 2ms
[+] Should be able to retrieve Windows optional feature Xps-Foundation-Xps-Viewer before the configuration 1ms
[-] Should have disabled Windows optional feature Xps-Foundation-Xps-Viewer before the configuration 3ms
Expected $true, but got $false.
90: $windowsOptionalFeature.State -in $script:disabledStates | Should -Be $true
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1: line 90
[-] Should compile and run configuration 17.11s
Expected no exception to be thrown, but an exception "Enable-WindowsOptionalFeature failed. Error code = 0x800f0950" was thrown from C:\Program Files\WindowsPowerShell\Module
s\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1:98 char:21
+ ... Start-DscConfiguration -Path $TestDrive -ErrorAction 'Sto ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
99: } | Should -Not -Throw
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1: line 95
[+] Should be able to retrieve Windows optional feature RSAT-RDS-Tools-Feature after the configuration 6ms
[+] Should have enabled Windows optional feature RSAT-RDS-Tools-Feature after the configuration 2ms
[+] Should be able to retrieve Windows optional feature Xps-Foundation-Xps-Viewer after the configuration 1ms
[-] Should have enabled Windows optional feature Xps-Foundation-Xps-Viewer after the configuration 19ms
Expected $true, but got $false.
120: $windowsOptionalFeature.State -in $script:enabledStates | Should -Be $true
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1: line 120
[+] Should have created the log file 3ms
[+] Should have created content in the log file 3ms
Context Uninstall two valid Windows optional features
[+] Should be able to retrieve Windows optional feature RSAT-RDS-Tools-Feature before the configuration 2ms
[+] Should have enabled Windows optional feature RSAT-RDS-Tools-Feature before the configuration 2ms
[+] Should be able to retrieve Windows optional feature Xps-Foundation-Xps-Viewer before the configuration 1ms
[-] Should have enabled Windows optional feature Xps-Foundation-Xps-Viewer before the configuration 3ms
Expected $true, but got $false.
166: $windowsOptionalFeature.State -in $script:enabledStates | Should -Be $true
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1: line 166
[+] Should compile and run configuration 5.15s
[+] Should be able to retrieve Windows optional feature RSAT-RDS-Tools-Feature after the confguration 2ms
[+] Should have disabled Windows optional feature RSAT-RDS-Tools-Feature after the confguration 2ms
[+] Should be able to retrieve Windows optional feature Xps-Foundation-Xps-Viewer after the confguration 2ms
[-] Should have disabled Windows optional feature Xps-Foundation-Xps-Viewer after the confguration 18ms
Expected $true, but got $false.
196: $windowsOptionalFeature.State -in $script:disabledStates | Should -Be $true
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1: line 196
[+] Should have created the log file 8ms
[+] Should have created content in the log file 3ms
[-] Error occurred in Describe block 0ms
RuntimeException: The variable '$windowsOptionalFeatureName' cannot be retrieved because it has not been set.
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\xPSDesiredStateConfiguration\Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1: line 51
at Invoke-Blocks, C:\Program Files\WindowsPowerShell\Modules\Pester\4.7.1\Functions\SetupTeardown.ps1: line 144
at Invoke-TestGroupTeardownBlocks, C:\Program Files\WindowsPowerShell\Modules\Pester\4.7.1\Functions\SetupTeardown.ps1: line 134
at DescribeImpl, C:\Program Files\WindowsPowerShell\Modules\Pester\4.7.1\Functions\Describe.ps1: line 203
WARNING: There is no operation running currently. Stop will return without any action.
Details of the scenario you tried and the problem that is occurring
Tests in 'Tests\Integration\xWindowsOptionalFeatureSet.Integration.Tests.ps1' appear to be broken (at least) on Windows Server 2019. The problem occurs when the tests try to disable a feature. On my test machine, there is a third Disabled state, DisabledWithPayloadRemoved, which these tests are not looking for.
Verbose logs showing the problem
Here's what my feature state looks like:
Here's the test results:
The operating system the target node is running
PS C:> Get-ComputerInfo -Property @(
'OsName',
'OsOperatingSystemSKU',
'OSArchitecture',
'WindowsVersion',
'WindowsBuildLabEx',
'OsLanguage',
'OsMuiLanguages')
OsName : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
PS C:> $PSVersionTable
Name Value
PSVersion 5.1.17763.316
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.316
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
dev
The text was updated successfully, but these errors were encountered: