File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -343,4 +343,16 @@ Describe 'Parameters tests' {
343343 $errorMessage = Get-Content - Path $TestDrive / error.log - Raw
344344 $errorMessage | Should - BeLike " *ERROR*Cannot read from STDIN for both parameters and input*"
345345 }
346+
347+ It ' Invalid parameters read from STDIN result in error' {
348+ $params = @ {
349+ osFamily = ' Windows'
350+ } | ConvertTo-Json - Compress
351+
352+ $out = $params | dsc config -f - test -f " $PSScriptRoot /../examples/osinfo_parameters.dsc.yaml" 2> $TestDrive / error.log
353+ $LASTEXITCODE | Should - Be 4
354+ $out | Should - BeNullOrEmpty
355+ $errorMessage = Get-Content - Path $TestDrive / error.log - Raw
356+ $errorMessage | Should - BeLike " *ERROR*Parameter input failure: JSON: missing field ```` parameters```` *"
357+ }
346358}
You can’t perform that action at this time.
0 commit comments