@@ -65,17 +65,17 @@ Describe 'Invoke-ReportServerSetupAction' -Tag 'Private' {
6565 @ {
6666 MockParameterSetName = ' Install'
6767 # cSpell: disable-next
68- MockExpectedParameters = ' -Install -AcceptLicensingTerms -MediaPath <string> [-ProductKey <string>] [-EditionUpgrade] [-Edition <string>] [-LogPath <string>] [-InstallFolder <string>] [-Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
68+ MockExpectedParameters = ' -Install -AcceptLicensingTerms -MediaPath <string> [-ProductKey <string>] [-EditionUpgrade] [-Edition <string>] [-LogPath <string>] [-InstallFolder <string>] [-SuppressRestart] [- Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
6969 }
7070 @ {
7171 MockParameterSetName = ' Uninstall'
7272 # cSpell: disable-next
73- MockExpectedParameters = ' -Uninstall -MediaPath <string> [-LogPath <string>] [-Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
73+ MockExpectedParameters = ' -Uninstall -MediaPath <string> [-LogPath <string>] [-SuppressRestart] [- Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
7474 }
7575 @ {
7676 MockParameterSetName = ' Repair'
7777 # cSpell: disable-next
78- MockExpectedParameters = ' -Repair -AcceptLicensingTerms -MediaPath <string> [-ProductKey <string>] [-EditionUpgrade] [-Edition <string>] [-LogPath <string>] [-InstallFolder <string>] [-Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
78+ MockExpectedParameters = ' -Repair -AcceptLicensingTerms -MediaPath <string> [-ProductKey <string>] [-EditionUpgrade] [-Edition <string>] [-LogPath <string>] [-InstallFolder <string>] [-SuppressRestart] [- Timeout <uint>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]'
7979 }
8080 ) {
8181 InModuleScope - Parameters $_ - ScriptBlock {
@@ -231,8 +231,17 @@ Describe 'Invoke-ReportServerSetupAction' -Tag 'Private' {
231231 MockParameterValue = ' C:\Program Files\ReportServer'
232232 MockExpectedRegEx = ' \/InstallFolder="C:\\Program Files\\ReportServer"'
233233 }
234+ @ {
235+ MockParameterName = ' SuppressRestart'
236+ MockParameterValue = $true
237+ MockExpectedRegEx = ' \/norestart'
238+ }
234239 ) {
235240 BeforeAll {
241+ Mock - CommandName Test-Path - MockWith {
242+ return $true
243+ }
244+
236245 Mock - CommandName Start-SqlSetupProcess - MockWith {
237246 return 0
238247 } - RemoveParameterValidation ' FilePath'
@@ -570,6 +579,10 @@ Describe 'Invoke-ReportServerSetupAction' -Tag 'Private' {
570579 }
571580 ) {
572581 BeforeAll {
582+ Mock - CommandName Test-Path - MockWith {
583+ return $true
584+ }
585+
573586 Mock - CommandName Start-SqlSetupProcess - MockWith {
574587 return 0
575588 } - RemoveParameterValidation ' FilePath'
0 commit comments