File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
tests/Integration/Resources Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,28 @@ Describe "$($script:dscResourceFriendlyName)_Integration" -Tag @('Integration_SQ
4545 }
4646
4747 Context ' When getting the current state of the resource' {
48+ It ' DEBUG - WILL THIS FAIL? - Should return the expected current state with all properties' {
49+ $desiredParameters = @ {
50+ KeyProperty = ' TEST_KEY_002'
51+ MandatoryProperty = ' TestMandatoryValue'
52+ WriteProperty = ' DesiredWriteValue'
53+ }
54+
55+ $result = dsc -- trace-level trace resource get -- resource SqlServerDsc/ DebugDscEngine -- output- format json -- input ($desiredParameters | ConvertTo-Json - Compress) | ConvertFrom-Json
56+
57+ $dscExitCode = $LASTEXITCODE # cSpell: ignore LASTEXITCODE
58+
59+ if ($dscExitCode -ne 0 )
60+ {
61+ throw (' DSC executable failed with exit code {0}.' -f $dscExitCode )
62+ }
63+
64+ $result.actualState.KeyProperty | Should - Be ' TEST_KEY_002'
65+ $result.actualState.MandatoryProperty | Should - Be ' CurrentMandatoryStateValue'
66+ $result.actualState.WriteProperty | Should - Be ' CurrentStateValue'
67+ $result.actualState.ReadProperty | Should -Match ' ^ReadOnlyValue_\d{8}_\d{6}$'
68+ }
69+
4870 It ' Should return the expected current state with minimal properties' {
4971 $desiredParameters = @ {
5072 KeyProperty = ' TEST_KEY_001'
You can’t perform that action at this time.
0 commit comments