New pester test for Start-DscConfiguration

This commit is contained in:
George Fleming
2016-01-04 10:27:43 -08:00
parent 67b53068e1
commit 401abdc7e8
2 changed files with 39 additions and 0 deletions
@@ -0,0 +1,17 @@
# Note that omicli must be in PATH and omiserver should be started with
# --ignoreAuthentication option
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$mof = "$here/assets/sample.mof"
$file = "/tmp/linux.txt"
Describe "Start-DscConfiguration" {
Import-Module Microsoft.PowerShell.Commands.Omi
It "Should create file per sample MOF file" {
$s = Start-DscConfiguration -ConfigurationMof $mof |
Where-Object {$_.NAME -eq "ReturnValue"}
$s.VALUE | Should Be "0"
$file | Should Exist
}
}
@@ -0,0 +1,22 @@
instance of MSFT_nxFileResource
{
Contents = "my contents";
DestinationPath = "/tmp/linux.txt";
Ensure = "Present";
Type = "File";
Owner = "root";
Group = "root";
Mode = "644";
ResourceId = "[MSFT_nxFileResource]File1";
ModuleName = "nx";
ModuleVersion = "1.0";
};
instance of OMI_ConfigurationDocument
{
Version="1.0.0";
};