Erweitere Tests für Merge-DSCConfigurationData, um leere Array-Merge-Schlüssel zu akzeptieren und Parameterbindung-Fehler zu vermeiden. Aktualisiere Modulversion auf 1.1.1 und passe Release-Notizen an.
This commit is contained in:
@@ -129,4 +129,30 @@ Describe "Merge-DSCConfigurationData" {
|
||||
($Registry | Where-Object { $_.Key -eq "K1" }).ValueData | Should Be "Deployment-K1"
|
||||
($Registry | Where-Object { $_.Key -eq "K2" }).Default | Should Be "Template-K2"
|
||||
}
|
||||
|
||||
It "accepts arrays whose items do not have merge keys" {
|
||||
$Template = @{
|
||||
Parameters = @{
|
||||
AuthenticationMethod = @{
|
||||
AllowedValues = @(
|
||||
"NTLM",
|
||||
"Kerberos"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Deployment = @{
|
||||
Parameters = @{
|
||||
AuthenticationMethod = @{
|
||||
AllowedValues = @(
|
||||
"NTLM",
|
||||
"Kerberos"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{ Merge-DSCConfigurationData -Template $Template -Deployment $Deployment } | Should Not Throw
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@{
|
||||
@{
|
||||
RootModule = "Merge-DSCConfigurationData.psm1"
|
||||
ModuleVersion = "1.1.0"
|
||||
ModuleVersion = "1.1.1"
|
||||
GUID = "c1c7e70d-9049-4eaa-a3c9-44a424c35ef5"
|
||||
Author = "Torsten Brendgen"
|
||||
Copyright = "(c) Torsten Brendgen. All rights reserved."
|
||||
@@ -21,7 +21,7 @@
|
||||
"DSC",
|
||||
"ConfigurationData"
|
||||
)
|
||||
ReleaseNotes = "Initial module layout."
|
||||
ReleaseNotes = "Allows empty array merge-key collections so scalar arrays such as AllowedValues merge without parameter binding errors."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ function Test-ConfigurationDataItemWildcard {
|
||||
[AllowNull()]
|
||||
$Item,
|
||||
[Parameter(Mandatory=$true)]
|
||||
[AllowEmptyCollection()]
|
||||
[String[]]
|
||||
$KeyNames
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user