mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
New pester test for Start-DscConfiguration
This commit is contained in:
@@ -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";
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user