Skip to content

Commit

Permalink
Merge branch 'main' into concat-array
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT authored Feb 22, 2024
2 parents 78642ef + de958e9 commit 746632b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ $projects = @(
"process",
"tools/dsctest",
"tools/test_group_resource",
"y2j"
"powershellgroup"
"wmigroup"
"y2j",
"powershellgroup",
"wmigroup",
"resources/brew"
"tools/dsctest"
)
$pedantic_unclean_projects = @("ntreg")
$clippy_unclean_projects = @("tree-sitter-dscexpression")
Expand Down
21 changes: 21 additions & 0 deletions dsc/tests/dsc_osinfo.tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Describe 'Tests for osinfo examples' {
It 'Config with default parameters and get works' {
$out = dsc config get -p $PSScriptRoot/../examples/osinfo_parameters.dsc.yaml | ConvertFrom-Json -Depth 10
$LASTEXITCODE | Should -Be 0
$expected = if ($IsWindows) {
'Windows'
} elseif ($IsLinux) {
'Linux'
} else {
'macOS'
}

$out.results[0].result.actualState.family | Should -BeExactly $expected
}

It 'Config test works' {
$out = dsc config -f $PSScriptRoot/../examples/osinfo.parameters.yaml test -p $PSScriptRoot/../examples/osinfo_parameters.dsc.yaml | ConvertFrom-Json -Depth 10
$LASTEXITCODE | Should -Be 0
$out.results[0].result.inDesiredState | Should -Be $IsMacOS
}
}

0 comments on commit 746632b

Please sign in to comment.