Skip to content

Commit

Permalink
fix osinfo tests due to change to correctly case macOS and don't vali…
Browse files Browse the repository at this point in the history
…date empty input
  • Loading branch information
SteveL-MSFT committed Jan 16, 2024
1 parent d736656 commit ad62830
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dsc_lib/src/dscresources/dscresource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ impl DscResource {
}

fn validate_input(&self, input: &str) -> Result<(), DscError> {
if input.len() == 0 {
return Ok(());
}
let Some(manifest) = &self.manifest else {
return Err(DscError::MissingManifest(self.type_name.clone()));
};
Expand Down
4 changes: 2 additions & 2 deletions osinfo/tests/osinfo.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Describe 'osinfo resource tests' {
$out.actualState.family | Should -BeExactly 'Linux'
}
elseif ($IsMacOS) {
$out.actualState.family | Should -BeExactly 'MacOS'
$out.actualState.family | Should -BeExactly 'macOS'
}

$out.actualState.version | Should -Not -BeNullOrEmpty
Expand Down Expand Up @@ -50,7 +50,7 @@ Describe 'osinfo resource tests' {
$out.resources[0].properties.family | Should -BeExactly 'Linux'
}
elseif ($IsMacOS) {
$out.resources[0].properties.family | Should -BeExactly 'MacOS'
$out.resources[0].properties.family | Should -BeExactly 'macOS'
}
}
}

0 comments on commit ad62830

Please sign in to comment.