Skip to content

Commit

Permalink
Install-SqlServerDsc: AgtSvcAccount no longer needed for Install (#…
Browse files Browse the repository at this point in the history
…1814)

- `Install-SqlServerDsc`
  - No longer throws an exception when parameter `AgtSvcAccount` is not specified.
  • Loading branch information
bleakprestiger authored Dec 4, 2022
1 parent 8dde54d commit 6c0e426
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- SqlServerDsc
- Update Stale GitHub Action to v6.
- Update to build module in separate folder under `output`.
- `Install-SqlServerDsc`
- No longer throws an exception when parameter `AgtSvcAccount` is not specified.


### Fixed

Expand Down
2 changes: 1 addition & 1 deletion source/Private/Assert-SetupActionProperties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function Assert-SetupActionProperties
}

# If feature is SQLENGINE, then for specified setup actions the parameter AgtSvcAccount is mandatory.
if ($SetupAction -in ('Install', 'CompleteImage', 'InstallFailoverCluster', 'PrepareFailoverCluster', 'AddNode'))
if ($SetupAction -in ('CompleteImage', 'InstallFailoverCluster', 'PrepareFailoverCluster', 'AddNode'))
{
if ($Property.ContainsKey('Features') -and $Property.Features -contains 'SQLENGINE')
{
Expand Down
5 changes: 0 additions & 5 deletions tests/Unit/Private/Assert-SetupActionProperties.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,6 @@ Describe 'Assert-SetupActionProperties' -Tag 'Private' {
}

Context 'When setup action is ''<MockSetupAction>'' and feature is ''<MockFeature>'' but parameter ''<MockMissingParameterName>'' is missing' -ForEach @(
@{
MockSetupAction = 'Install'
MockMissingParameterName = 'AgtSvcAccount'
MockFeature = 'SQLENGINE'
}
@{
MockSetupAction = 'CompleteImage'
MockMissingParameterName = 'AgtSvcAccount'
Expand Down

0 comments on commit 6c0e426

Please sign in to comment.