Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateServicesComputerTargetGroup: New resource - managing computer target groups #78

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Pin GitVersion to 5.x to resolve build errors

dab62a7
Select commit
Loading
Failed to load commit list.
Open

UpdateServicesComputerTargetGroup: New resource - managing computer target groups #78

Pin GitVersion to 5.x to resolve build errors
dab62a7
Select commit
Loading
Failed to load commit list.
Azure Pipelines / dsccommunity.UpdateServicesDsc failed Aug 28, 2024 in 3m 50s

Build #1.3.0-PR0078.14 had test failures

Details

Tests

  • Failed: 8 (6.45%)
  • Passed: 116 (93.55%)
  • Other: 0 (0.00%)
  • Total: 124

Annotations

Check failure on line 318 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

Build log #L318

    [-] Calling Get should throw when an error occurs retrieving WSUS Server information. 80ms (73ms|6ms)

Check failure on line 360 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

Build log #L360

    [-] Calling Get should not throw when the WSUS Server is not yet configured / cannot be found. 46ms (42ms|4ms)

Check failure on line 406 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

Build log #L406

    [-] Calling Get should throw when Computer Target Group does not exist at the specified path. 42ms (38ms|4ms)

Check failure on line 457 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

Build log #L457

    [-] Test-TargetResource should return $true when Computer Target Resource is in the desired state. 62ms (58ms|4ms)

Check failure on line 1 in MSFT_UpdateServicesComputerTargetGroup\Get-TargetResource..An error occurs retrieving WSUS Server configuration information..Calling Get should throw when an error occurs retrieving WSUS Server information.

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

MSFT_UpdateServicesComputerTargetGroup\Get-TargetResource..An error occurs retrieving WSUS Server configuration information..Calling Get should throw when an error occurs retrieving WSUS Server information.

Expected an exception, with message 'WSUS Computer Target Group configuration failed.' to be thrown, but no exception was thrown.
Raw output
at { $script:resource = Get-TargetResource -Name 'Servers' -Path 'All Computers'} | Should -Throw ($script:localizedData.WSUSConfigurationFailed), D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:64
at Invoke-Assertion, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8078
at Should<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8020
at <ScriptBlock>, D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:64
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2110
at Invoke-TestItem, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1184
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:826
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1662
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.ps1:3
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3154
at Invoke-InNewScriptScope, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3161
at Run-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1665
at Invoke-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2465
at Invoke-Pester<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:5225
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Sampler\0.118.1\tasks\Invoke-Pester.pester.build.ps1:906
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:629
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at <ScriptBlock><End>, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:787
at <ScriptBlock><Begin>, D:\a\1\s\build.ps1:507
at <ScriptBlock>, D:\a\_temp\d47aaa15-1559-4bb4-ad51-d578d851f55e.ps1:4
at <ScriptBlock>, <No file>:1

Check failure on line 1 in MSFT_UpdateServicesComputerTargetGroup\Get-TargetResource..The WSUS Server is not yet configured..Calling Get should not throw when the WSUS Server is not yet configured / cannot be found.

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

MSFT_UpdateServicesComputerTargetGroup\Get-TargetResource..The WSUS Server is not yet configured..Calling Get should not throw when the WSUS Server is not yet configured / cannot be found.

Expected Write-Verbose in module MSFT_UpdateServicesComputerTargetGroup to be called at least 1 times but was called 0 times
Raw output
at Should -Invoke @__params__p, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:14596
at Invoke-Assertion, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8078
at Should<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8020
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:14596
at Assert-MockCalled, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:14600
at <ScriptBlock>, D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:75
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2110
at Invoke-TestItem, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1184
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:826
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1662
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.ps1:3
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3154
at Invoke-InNewScriptScope, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3161
at Run-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1665
at Invoke-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2465
at Invoke-Pester<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:5225
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Sampler\0.118.1\tasks\Invoke-Pester.pester.build.ps1:906
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:629
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at <ScriptBlock><End>, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:787
at <ScriptBlock><Begin>, D:\a\1\s\build.ps1:507
at <ScriptBlock>, D:\a\_temp\d47aaa15-1559-4bb4-ad51-d578d851f55e.ps1:4
at <ScriptBlock>, <No file>:1

Check failure on line 1 in MSFT_UpdateServicesComputerTargetGroup\Get-TargetResource..The Computer Target Group is not in the desired state (specified name exists but not at the desired path)..Calling Get should throw when Computer Target Group does not exist at the specified path.

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

MSFT_UpdateServicesComputerTargetGroup\Get-TargetResource..The Computer Target Group is not in the desired state (specified name exists but not at the desired path)..Calling Get should throw when Computer Target Group does not exist at the specified path.

Expected an exception, with message 'A Computer Target Group with Name 'Desktops' already exists at Path 'All Computers/Workstations'.' to be thrown, but the message was 'System.InvalidOperationException: WSUS Computer Target Group configuration failed. ---> System.Exception: System.InvalidOperationException: A Computer Target Group with Name 'Desktops' already exists at Path 'All Computers/Workstations'.
   --- End of inner exception stack trace ---'. from D:\a\1\s\output\module\UpdateServicesDsc\1.3.0\Modules\DscResource.Common\0.17.2\DscResource.Common.psm1:3755 char:9
    +         throw $errorRecord
    +         ~~~~~~~~~~~~~~~~~~
Raw output
at { $script:resource = Get-TargetResource -Name 'Desktops' -Path 'All Computers/Servers' } | Should -Throw `, D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:101
at Invoke-Assertion, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8078
at Should<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8020
at <ScriptBlock>, D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:101
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2110
at Invoke-TestItem, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1184
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:826
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1662
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.ps1:3
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3154
at Invoke-InNewScriptScope, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3161
at Run-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1665
at Invoke-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2465
at Invoke-Pester<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:5225
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Sampler\0.118.1\tasks\Invoke-Pester.pester.build.ps1:906
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:629
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at <ScriptBlock><End>, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:787
at <ScriptBlock><Begin>, D:\a\1\s\build.ps1:507
at <ScriptBlock>, D:\a\_temp\d47aaa15-1559-4bb4-ad51-d578d851f55e.ps1:4
at <ScriptBlock>, <No file>:1

Check failure on line 1 in MSFT_UpdateServicesComputerTargetGroup\Test-TargetResource..The Computer Target Group "Desktops" is "Absent" at Path "All Computers/Workstations" which is the desired state (Present)..Test-TargetResource should return $true when Computer Target Resource is in the desired state.

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.UpdateServicesDsc

MSFT_UpdateServicesComputerTargetGroup\Test-TargetResource..The Computer Target Group "Desktops" is "Absent" at Path "All Computers/Workstations" which is the desired state (Present)..Test-TargetResource should return $true when Computer Target Resource is in the desired state.

Expected $true, but got $false.
Raw output
at $resource | Should -Be $true, D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:160
at Invoke-Assertion, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8078
at Should<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:8016
at <ScriptBlock>, D:\a\1\s\tests\Unit\MSFT_UpdateServicesComputerTargetGroup.tests.ps1:160
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2110
at Invoke-TestItem, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1184
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:826
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:881
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1988
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1949
at Invoke-ScriptBlock, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2113
at Invoke-Block, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:928
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1662
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.ps1:3
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3154
at Invoke-InNewScriptScope, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:3161
at Run-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:1665
at Invoke-Test, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:2465
at Invoke-Pester<End>, D:\a\1\s\output\RequiredModules\Pester\5.3.3\Pester.psm1:5225
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Sampler\0.118.1\tasks\Invoke-Pester.pester.build.ps1:906
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:629
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at *Task, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:601
at <ScriptBlock><End>, D:\a\1\s\output\RequiredModules\InvokeBuild\5.11.3\Invoke-Build.ps1:787
at <ScriptBlock><Begin>, D:\a\1\s\build.ps1:507
at <ScriptBlock>, D:\a\_temp\d47aaa15-1559-4bb4-ad51-d578d851f55e.ps1:4
at <ScriptBlock>, <No file>:1