Skip to content

Commit 0c3e211

Browse files
committed
Remove 'Features' parameter from Invoke-SetupAction and Repair-SqlDscServer tests to align with updated command behavior
1 parent b883a26 commit 0c3e211

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

tests/Unit/Private/Invoke-SetupAction.Tests.ps1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Describe 'Invoke-SetupAction' -Tag 'Private' {
9797
@{
9898
MockParameterSetName = 'Repair'
9999
# cSpell: disable-next
100-
MockExpectedParameters = '-Repair -MediaPath <string> -InstanceName <string> -Features <string[]> [-Enu] [-PBEngSvcAccount <string>] [-PBEngSvcPassword <securestring>] [-PBEngSvcStartupType <string>] [-PBStartPortRange <ushort>] [-PBEndPortRange <ushort>] [-PBScaleOut] [-Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
100+
MockExpectedParameters = '-Repair -MediaPath <string> -InstanceName <string> [-Enu] [-PBEngSvcAccount <string>] [-PBEngSvcPassword <securestring>] [-PBEngSvcStartupType <string>] [-PBStartPortRange <ushort>] [-PBEndPortRange <ushort>] [-PBScaleOut] [-Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
101101
}
102102
@{
103103
MockParameterSetName = 'RebuildDatabase'
@@ -2886,8 +2886,6 @@ Describe 'Invoke-SetupAction' -Tag 'Private' {
28862886
Repair = $true
28872887
MediaPath = '\SqlMedia'
28882888
InstanceName = 'INSTANCE'
2889-
# Intentionally using both upper- and lower-case in the value.
2890-
Features = 'SqlEngine'
28912889
}
28922890
}
28932891
}
@@ -2899,7 +2897,6 @@ Describe 'Invoke-SetupAction' -Tag 'Private' {
28992897

29002898
Should -Invoke -CommandName Start-SqlSetupProcess -ParameterFilter {
29012899
$ArgumentList | Should -MatchExactly '\/ACTION=Repair'
2902-
$ArgumentList | Should -MatchExactly '\/FEATURES=SQLENGINE'
29032900
$ArgumentList | Should -MatchExactly '\/INSTANCENAME="INSTANCE"' # cspell: disable-line
29042901

29052902
# Return $true if none of the above throw.
@@ -2916,7 +2913,6 @@ Describe 'Invoke-SetupAction' -Tag 'Private' {
29162913

29172914
Should -Invoke -CommandName Start-SqlSetupProcess -ParameterFilter {
29182915
$ArgumentList | Should -MatchExactly '\/ACTION=Repair'
2919-
$ArgumentList | Should -MatchExactly '\/FEATURES=SQLENGINE'
29202916
$ArgumentList | Should -MatchExactly '\/INSTANCENAME="INSTANCE"' # cspell: disable-line
29212917

29222918
# Return $true if none of the above throw.
@@ -2948,8 +2944,6 @@ Describe 'Invoke-SetupAction' -Tag 'Private' {
29482944
Repair = $true
29492945
MediaPath = '\SqlMedia'
29502946
InstanceName = 'INSTANCE'
2951-
# Intentionally using both upper- and lower-case in the value.
2952-
Features = 'SqlEngine'
29532947
Force = $true
29542948
PBStartPortRange = 16450
29552949
PBEndPortRange = 16460
@@ -3008,8 +3002,6 @@ Describe 'Invoke-SetupAction' -Tag 'Private' {
30083002
Repair = $true
30093003
MediaPath = '\SqlMedia'
30103004
InstanceName = 'INSTANCE'
3011-
# Intentionally using both upper- and lower-case in the value.
3012-
Features = 'SqlEngine'
30133005
Force = $true
30143006
}
30153007
}

tests/Unit/Public/Repair-SqlDscServer.Tests.ps1

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Describe 'Repair-SqlDscServer' -Tag 'Public' {
5252
@{
5353
MockParameterSetName = '__AllParameterSets'
5454
# cSpell: disable-next
55-
MockExpectedParameters = '[-MediaPath] <string> [-InstanceName] <string> [-Features] <string[]> [[-PBEngSvcAccount] <string>] [[-PBEngSvcPassword] <securestring>] [[-PBEngSvcStartupType] <string>] [[-PBStartPortRange] <ushort>] [[-PBEndPortRange] <ushort>] [[-Timeout] <uint>] [-Enu] [-PBScaleOut] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
55+
MockExpectedParameters = '[-MediaPath] <string> [-InstanceName] <string> [[-PBEngSvcAccount] <string>] [[-PBEngSvcPassword] <securestring>] [[-PBEngSvcStartupType] <string>] [[-PBStartPortRange] <ushort>] [[-PBEndPortRange] <ushort>] [[-Timeout] <uint>] [-Enu] [-PBScaleOut] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
5656
}
5757
) {
5858
$result = (Get-Command -Name 'Repair-SqlDscServer').ParameterSets |
@@ -94,8 +94,6 @@ Describe 'Repair-SqlDscServer' -Tag 'Public' {
9494
$mockDefaultParameters = @{
9595
MediaPath = '\SqlMedia'
9696
InstanceName = 'INSTANCE'
97-
# Intentionally using both upper- and lower-case in the value.
98-
Features = 'SqlEngine'
9997
ErrorAction = 'Stop'
10098
}
10199
}
@@ -106,7 +104,6 @@ Describe 'Repair-SqlDscServer' -Tag 'Public' {
106104

107105
Should -Invoke -CommandName Start-SqlSetupProcess -ParameterFilter {
108106
$ArgumentList | Should -MatchExactly '\/ACTION=Repair'
109-
$ArgumentList | Should -MatchExactly '\/FEATURES=SQLENGINE'
110107
$ArgumentList | Should -MatchExactly '\/INSTANCENAME="INSTANCE"' # cspell: disable-line
111108

112109
# Return $true if none of the above throw.
@@ -121,7 +118,6 @@ Describe 'Repair-SqlDscServer' -Tag 'Public' {
121118

122119
Should -Invoke -CommandName Start-SqlSetupProcess -ParameterFilter {
123120
$ArgumentList | Should -MatchExactly '\/ACTION=Repair'
124-
$ArgumentList | Should -MatchExactly '\/FEATURES=SQLENGINE'
125121
$ArgumentList | Should -MatchExactly '\/INSTANCENAME="INSTANCE"' # cspell: disable-line
126122

127123
# Return $true if none of the above throw.
@@ -148,8 +144,6 @@ Describe 'Repair-SqlDscServer' -Tag 'Public' {
148144
$repairSqlDscServerParameters = @{
149145
MediaPath = '\SqlMedia'
150146
InstanceName = 'INSTANCE'
151-
# Intentionally using both upper- and lower-case in the value.
152-
Features = 'SqlEngine'
153147
Force = $true
154148
PBStartPortRange = 16450
155149
PBEndPortRange = 16460
@@ -204,8 +198,6 @@ Describe 'Repair-SqlDscServer' -Tag 'Public' {
204198
$mockDefaultParameters = @{
205199
MediaPath = '\SqlMedia'
206200
InstanceName = 'INSTANCE'
207-
# Intentionally using both upper- and lower-case in the value.
208-
Features = 'SqlEngine'
209201
Force = $true
210202
ErrorAction = 'Stop'
211203
}

0 commit comments

Comments
 (0)