dsccommunity / dsccommunity/SqlServerDsc
SqlServerDsc: Integration test fail general error
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
The integration test failed with the below error when PR was merged to dev. We should look if we can prevent this error by adding a check if there is still a Consistency Check pending.
Or maybe it is enough to call Invoke-AppveyorTestScriptTask with the parameter DisableConsistency, because it tried to do a scheduled consistency check precisely at that time 🤔
[-] Should be able to call Get-DscConfiguration without throwing 93ms
Expected no exception to be thrown, but an exception "Cannot invoke the Get-DscConfiguration cmdlet. The Consistency Check or Pull cmdlet is in progress and must return before Get-DscConfiguration can be invoked. Use -Force option if that is available to cancel the current operation." was thrown from C:\projects\sqlserverdsc\Tests\Integration\MSFT_SqlServerRole.Integration.Tests.ps1:122 char:52
+ ... urrentConfiguration = Get-DscConfiguration -Verbose -ErrorAction Stop
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
123: } | Should -Not -Throw
at <ScriptBlock>, C:\projects\sqlserverdsc\Tests\Integration\MSFT_SqlServerRole.Integration.Tests.ps1: line 121
[-] Should have set the resource and all the parameters should match 79ms
Expected 'Present', but got $null.
133: $resourceCurrentState.Ensure | Should -Be 'Present'
at <ScriptBlock>, C:\projects\sqlserverdsc\Tests\Integration\MSFT_SqlServerRole.Integration.Tests.ps1: line
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Tests/Integration/MSFT_SqlServerRole.Integration.Tests.ps1 around lines 121-133 and review the linked AppVeyor log for the consistency-check failure. Examine how Invoke-AppveyorTestScriptTask is called and whether the pending check is handled there. Done means the integration test no longer fails with the in-progress consistency-check error and the resource state assertions pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100