Last active
January 25, 2016 00:30
-
-
Save PlagueHO/e3d943ebd95fb4156ea2 to your computer and use it in GitHub Desktop.
Example DSC Resource Integration Tests Step 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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