Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
Last active January 25, 2016 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/e3d943ebd95fb4156ea2 to your computer and use it in GitHub Desktop.
Save PlagueHO/e3d943ebd95fb4156ea2 to your computer and use it in GitHub Desktop.
Example DSC Resource Integration Tests Step 1
# Ensure that the tests can be performed on this computer
$ProductType = (Get-CimInstance Win32_OperatingSystem).ProductType
Describe 'Environment' {
Context 'Operating System' {
It 'Should be a Server OS' {
$ProductType | Should Be 3
}
}
}
if ($ProductType -ne 3)
{
Break
}
$Installed = (Get-WindowsFeature -Name FS-iSCSITarget-Server).Installed
Describe 'Environment' {
Context 'Windows Features' {
It 'Should have the iSCSI Target Feature Installed' {
$Installed | Should Be $true
}
}
}
if ($Installed -eq $false)
{
Break
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment