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 @@ -364,4 +364,16 @@ Describe 'PowerShell adapter resource tests' {
364
364
$res = $r | ConvertFrom-Json
365
365
$res.actualState.HashTableProp.Name | Should - Be ' DSCv3'
366
366
}
367
+
368
+ It ' Specifying version works' {
369
+ $out = dsc resource get - r TestClassResource/ TestClassResource -- version 0.0 .1 | ConvertFrom-Json
370
+ $LASTEXITCODE | Should - Be 0
371
+ $out.actualState.Ensure | Should - BeExactly ' Present'
372
+ }
373
+
374
+ It ' Specifying a non-existent version returns an error' {
375
+ $null = dsc resource get - r TestClassResource/ TestClassResource -- version 0.0 .2 2> $TestDrive / error.log
376
+ $LASTEXITCODE | Should - Be 7
377
+ Get-Content - Path $TestDrive / error.log | Should -Match ' Resource not found: TestClassResource/TestClassResource 0.0.2'
378
+ }
367
379
}
You can’t perform that action at this time.
0 commit comments