Skip to content

Commit

Permalink
SqlServerDsc: Add QA tests for commands (dsccommunity#1830)
Browse files Browse the repository at this point in the history
- SqlServerDsc
  - New QA tests for public commands and private functions.
  • Loading branch information
johlju authored Jan 4, 2023
1 parent 914c53c commit bed3b12
Show file tree
Hide file tree
Showing 32 changed files with 1,977 additions and 541 deletions.
1 change: 1 addition & 0 deletions .github/prquantifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Thresholds:
- Value: 1000
Label: PR extra large
Color: Red
IgnoreRenamed: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add the GitHub App _Pull Request Quantifier_ as an experiment to see if it
brings any value ([issue #1811](https://github.com/dsccommunity/SqlServerDsc/issues/1811)).
- Updated thresholds, and label names and colors.
- New QA tests for public commands and private functions.
- SqlDatabase
- Added compatibility levels for SQL Server 2022 (major version 16).
- SqlSetup
Expand Down
1 change: 1 addition & 0 deletions source/Private/Assert-SetupActionProperties.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#>
function Assert-SetupActionProperties
{
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '', Justification='The command uses plural noun to describe that it contain a collection of asserts.')]
[CmdletBinding()]
param
(
Expand Down
314 changes: 310 additions & 4 deletions source/Private/Invoke-SetupAction.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,312 @@
Specifies the path where to find the SQL Server installation media. On this
path the SQL Server setup executable must be found.
.PARAMETER Timeout
Specifies how long to wait for the setup process to finish. Default value
is `7200` seconds (2 hours). If the setup process does not finish before
this time, an exception will be thrown.
.PARAMETER Force
If specified the command will not ask for confirmation. Same as if Confirm:$false
is used.
.PARAMETER SuppressPrivacyStatementNotice
See the notes section for more information.
.PARAMETER IAcknowledgeEntCalLimits
See the notes section for more information.
.PARAMETER InstanceName
See the notes section for more information.
.PARAMETER Enu
See the notes section for more information.
.PARAMETER UpdateEnabled
See the notes section for more information.
.PARAMETER UpdateSource
See the notes section for more information.
.PARAMETER Features
See the notes section for more information.
.PARAMETER Role
See the notes section for more information.
.PARAMETER InstallSharedDir
See the notes section for more information.
.PARAMETER InstallSharedWowDir
See the notes section for more information.
.PARAMETER InstanceDir
See the notes section for more information.
.PARAMETER InstanceId
See the notes section for more information.
.PARAMETER PBEngSvcAccount
See the notes section for more information.
.PARAMETER PBEngSvcPassword
See the notes section for more information.
.PARAMETER PBEngSvcStartupType
See the notes section for more information.
.PARAMETER PBDMSSvcAccount
See the notes section for more information.
.PARAMETER PBDMSSvcPassword
See the notes section for more information.
.PARAMETER PBDMSSvcStartupType
See the notes section for more information.
.PARAMETER PBStartPortRange
See the notes section for more information.
.PARAMETER PBEndPortRange
See the notes section for more information.
.PARAMETER PBScaleOut
See the notes section for more information.
.PARAMETER ProductKey
See the notes section for more information.
.PARAMETER AgtSvcAccount
See the notes section for more information.
.PARAMETER AgtSvcPassword
See the notes section for more information.
.PARAMETER AgtSvcStartupType
See the notes section for more information.
.PARAMETER ASBackupDir
See the notes section for more information.
.PARAMETER ASCollation
See the notes section for more information.
.PARAMETER ASConfigDir
See the notes section for more information.
.PARAMETER ASDataDir
See the notes section for more information.
.PARAMETER ASLogDir
See the notes section for more information.
.PARAMETER ASTempDir
See the notes section for more information.
.PARAMETER ASServerMode
See the notes section for more information.
.PARAMETER ASSvcAccount
See the notes section for more information.
.PARAMETER ASSvcPassword
See the notes section for more information.
.PARAMETER ASSvcStartupType
See the notes section for more information.
.PARAMETER ASSysAdminAccounts
See the notes section for more information.
.PARAMETER ASProviderMSOLAP
See the notes section for more information.
.PARAMETER FarmAccount
See the notes section for more information.
.PARAMETER FarmPassword
See the notes section for more information.
.PARAMETER Passphrase
See the notes section for more information.
.PARAMETER FarmAdminiPort
See the notes section for more information.
.PARAMETER BrowserSvcStartupType
See the notes section for more information.
.PARAMETER FTUpgradeOption
See the notes section for more information.
.PARAMETER EnableRanU
See the notes section for more information.
.PARAMETER InstallSqlDataDir
See the notes section for more information.
.PARAMETER SqlBackupDir
See the notes section for more information.
.PARAMETER SecurityMode
See the notes section for more information.
.PARAMETER SAPwd
See the notes section for more information.
.PARAMETER SqlCollation
See the notes section for more information.
.PARAMETER AddCurrentUserAsSqlAdmin
See the notes section for more information.
.PARAMETER SqlSvcAccount
See the notes section for more information.
.PARAMETER SqlSvcPassword
See the notes section for more information.
.PARAMETER SqlSvcStartupType
See the notes section for more information.
.PARAMETER SqlSysAdminAccounts
See the notes section for more information.
.PARAMETER SqlTempDbDir
See the notes section for more information.
.PARAMETER SqlTempDbLogDir
See the notes section for more information.
.PARAMETER SqlTempDbFileCount
See the notes section for more information.
.PARAMETER SqlTempDbFileSize
See the notes section for more information.
.PARAMETER SqlTempDbFileGrowth
See the notes section for more information.
.PARAMETER SqlTempDbLogFileSize
See the notes section for more information.
.PARAMETER SqlTempDbLogFileGrowth
See the notes section for more information.
.PARAMETER SqlUserDbDir
See the notes section for more information.
.PARAMETER SqlSvcInstantFileInit
See the notes section for more information.
.PARAMETER SqlUserDbLogDir
See the notes section for more information.
.PARAMETER SqlMaxDop
See the notes section for more information.
.PARAMETER UseSqlRecommendedMemoryLimits
See the notes section for more information.
.PARAMETER SqlMinMemory
See the notes section for more information.
.PARAMETER SqlMaxMemory
See the notes section for more information.
.PARAMETER FileStreamLevel
See the notes section for more information.
.PARAMETER FileStreamShareName
See the notes section for more information.
.PARAMETER ISSvcAccount
See the notes section for more information.
.PARAMETER ISSvcPassword
See the notes section for more information.
.PARAMETER ISSvcStartupType
See the notes section for more information.
.PARAMETER AllowUpgradeForSSRSSharePointMode
See the notes section for more information.
.PARAMETER NpEnabled
See the notes section for more information.
.PARAMETER TcpEnabled
See the notes section for more information.
.PARAMETER RsInstallMode
See the notes section for more information.
.PARAMETER RSSvcAccount
See the notes section for more information.
.PARAMETER RSSvcPassword
See the notes section for more information.
.PARAMETER RSSvcStartupType
See the notes section for more information.
.PARAMETER MPYCacheDirectory
See the notes section for more information.
.PARAMETER MRCacheDirectory
See the notes section for more information.
.PARAMETER SqlInstJava
See the notes section for more information.
.PARAMETER SqlJavaDir
See the notes section for more information.
.PARAMETER FailoverClusterGroup
See the notes section for more information.
.PARAMETER FailoverClusterDisks
See the notes section for more information.
.PARAMETER FailoverClusterNetworkName
See the notes section for more information.
.PARAMETER FailoverClusterIPAddresses
See the notes section for more information.
.PARAMETER ConfirmIPDependencyChange
See the notes section for more information.
.PARAMETER FailoverClusterRollOwnership
See the notes section for more information.
.PARAMETER AzureSubscriptionId
See the notes section for more information.
.PARAMETER AzureResourceGroup
See the notes section for more information.
.PARAMETER AzureRegion
See the notes section for more information.
.PARAMETER AzureTenantId
See the notes section for more information.
.PARAMETER AzureServicePrincipal
See the notes section for more information.
.PARAMETER AzureServicePrincipalSecret
See the notes section for more information.
.PARAMETER AzureArcProxy
See the notes section for more information.
.PARAMETER SkipRules
See the notes section for more information.
.PARAMETER ProductCoveredBySA
See the notes section for more information.
.LINK
https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt
Expand Down Expand Up @@ -150,16 +456,16 @@
Removes the node from the failover cluster of the instance 'MyInstance'.
.NOTES
All parameters has intentionally not been added to this comment-based help
since it would take a lot of effort to keep it up to date. Instead there is
a link in the comment-based help that points to the SQL Server command line
setup documentation which will stay relevant.
The parameters are intentionally not described since it would take a lot
of effort to keep them up to date. Instead there is a link that points to
the SQL Server command line setup documentation which will stay relevant.
For RebuildDatabase the parameter SAPwd must be set if the instance was
installed with SecurityMode = 'SQL'.
#>
function Invoke-SetupAction
{
# cSpell: ignore PBDMS Admini AZUREEXTENSION
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
[OutputType()]
param
Expand Down
Loading

0 comments on commit bed3b12

Please sign in to comment.