fix dsc scenario (#63)

* fix dsc scenario

* revert unintended change
chkuech/nested-fix
Chris Kuech 2020-03-08 21:31:09 -07:00 committed by GitHub
parent 184ada5951
commit f74b21e6dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -66,7 +66,7 @@ function New-Requirement {
Property = $Property
}
[Requirement]@{
Name = $Namespace
Namespace = $Namespace
Describe = $Describe
Test = { Invoke-DscResource -Method "Test" @dscParams }.GetNewClosure()
Set = { Invoke-DscResource -Method "Set" @dscParams }.GetNewClosure()

View File

@ -35,7 +35,7 @@ Describe "New-Requirement" {
Context "'Dsc' parameter set" {
It "Should not be empty" -Skip:$PlatformLacksDscSupport {
$requirement = @{
Describe = "My Dsc Requirement"
Describe = "My Dsc Requirement 1"
ResourceName = "File"
ModuleName = "PSDesiredStateConfiguration"
Property = @{
@ -62,10 +62,9 @@ Describe "Invoke-Requirement" {
$tempFilePath = "$env:TEMP\_dsctest_$(New-Guid).txt"
$content = "Hello world"
$params = @{
Name = "[file]MyFile"
Describe = "My Dsc Requirement"
ResourceName = "File"
Describe = "My Dsc Requirement 2"
ModuleName = "PSDesiredStateConfiguration"
ResourceName = "File"
Property = @{
Contents = $content
DestinationPath = $tempFilePath