Skip to content

Commit 1a0b322

Browse files
authored
Issue with 'Test-DscParameterState' (#36)
1 parent f2621d5 commit 1a0b322

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
- Renamed 'Test-DscParameterState' to 'Test-DscParameterState2' for a conflict with 'DscResource.Common'.
9+
810
### Added
911

1012
- Migrated the resource to Sampler

RequiredModules.psd1

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
InvokeBuild = 'latest'
1111
PSScriptAnalyzer = 'latest'
12-
Pester = 'latest'
12+
Pester = '4.10.1'
1313
Plaster = 'latest'
1414
ModuleBuilder = 'latest'
1515
ChangelogManagement = 'latest'
@@ -20,5 +20,4 @@
2020
'DscResource.DocGenerator' = 'latest'
2121
'DscResource.Common' = 'latest'
2222
xDscResourceDesigner = 'latest'
23-
PSPKI = 'latest'
2423
}

source/DSCClassResources/JeaRoleCapabilities/JeaRoleCapabilities.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class JeaRoleCapabilities
245245
}
246246
}
247247

248-
$compare = Test-DscParameterState -CurrentValues $currentState -DesiredValues $Parameters -SortArrayValues -TurnOffTypeChecking -ReverseCheck
248+
$compare = Test-DscParameterState2 -CurrentValues $currentState -DesiredValues $Parameters -SortArrayValues -TurnOffTypeChecking -ReverseCheck
249249

250250
return $compare
251251
}

source/DSCClassResources/JeaSessionConfiguration/JeaSessionConfiguration.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class JeaSessionConfiguration
270270
}
271271
}
272272

273-
$compare = Test-DscParameterState -CurrentValues $currentState -DesiredValues $parameters -TurnOffTypeChecking -SortArrayValues -ReverseCheck
273+
$compare = Test-DscParameterState2 -CurrentValues $currentState -DesiredValues $parameters -TurnOffTypeChecking -SortArrayValues -ReverseCheck
274274

275275
return $compare
276276
}

source/Modules/JeaDsc.Common/JeaDsc.Common.psm1

+7-7
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ function Convert-StringToObject
682682
}
683683
}
684684

685-
function Test-DscParameterState
685+
function Test-DscParameterState2
686686
{
687687
[CmdletBinding()]
688688
param
@@ -967,11 +967,11 @@ function Test-DscParameterState
967967

968968
if ($returnValue)
969969
{
970-
$returnValue = Test-DscParameterState @param
970+
$returnValue = Test-DscParameterState2 @param
971971
}
972972
else
973973
{
974-
Test-DscParameterState @param | Out-Null
974+
Test-DscParameterState2 @param | Out-Null
975975
}
976976
continue
977977
}
@@ -1000,11 +1000,11 @@ function Test-DscParameterState
10001000

10011001
if ($returnValue)
10021002
{
1003-
$returnValue = Test-DscParameterState @param
1003+
$returnValue = Test-DscParameterState2 @param
10041004
}
10051005
else
10061006
{
1007-
Test-DscParameterState @param | Out-Null
1007+
Test-DscParameterState2 @param | Out-Null
10081008
}
10091009
continue
10101010
}
@@ -1054,11 +1054,11 @@ function Test-DscParameterState
10541054

10551055
if ($returnValue)
10561056
{
1057-
$returnValue = Test-DscParameterState @reverseCheckParameters
1057+
$returnValue = Test-DscParameterState2 @reverseCheckParameters
10581058
}
10591059
else
10601060
{
1061-
$null = Test-DscParameterState @reverseCheckParameters
1061+
$null = Test-DscParameterState2 @reverseCheckParameters
10621062
}
10631063
}
10641064

source/Modules/JeaDsc.Common/en-us/JeaDsc.Common.strings.psd1

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Localized resources for JeaDsc
22

33
ConvertFrom-StringData @'
4-
InvalidCurrentValuesError = Property 'CurrentValues' in Test-DscParameterState must be either a Hashtable, CimInstance or CimIntance[]. Type detected was '{0}'.
5-
InvalidDesiredValuesError = Property 'DesiredValues' in Test-DscParameterState must be either a Hashtable or CimInstance. Type detected was '{0}'.
4+
InvalidCurrentValuesError = Property 'CurrentValues' in Test-DscParameterState2 must be either a Hashtable, CimInstance or CimIntance[]. Type detected was '{0}'.
5+
InvalidDesiredValuesError = Property 'DesiredValues' in Test-DscParameterState2 must be either a Hashtable or CimInstance. Type detected was '{0}'.
66
InvalidValuesToCheckError = If 'DesiredValues' is a CimInstance then property 'ValuesToCheck' must contain a value.
77
TestDscParameterCompareMessage = Comparing values in property '{0}'.
88
MatchPsCredentialUsernameMessage = MATCH: PSCredential username match. Current state is '{0}' and desired state is '{1}'.

0 commit comments

Comments
 (0)