dsccommunity / dsccommunity/SqlServerDsc

SqlSetup: Unit test does a lot of verbose output

Open
#775 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Details of the scenario you tried and the problem that is occurring:
The unit test is outputting a lot of verbose messages. This is so it is possible to know which parameters differ.
But maybe we could change so that if the It-block fails, using -ErrorVariable like the integration test does, then we print the verbose output. That would lower the overall rows that AppVeyor need to process.

VERBOSE: Verifying setup argument count (expected vs actual)
VERBOSE: Expected: Action,FailoverClusterIPAddresses,SQLUserDBDir,IAcceptSQLServerLicenseTerms,SQLTempDBLogDir,FailoverClusterGroup,SQLBackupDir,Quiet,InstanceName,SQLUserDBLogDir,SQLSysAdminAccounts,SQLTempDBDir,FailoverClusterNetworkName,SkipRules,Features,FailoverClusterDisks,InstallSQLDataDir
VERBOSE: Actual: INSTANCENAME,FEATURES,SQLTEMPDBLOGDIR,SKIPRULES,SQLUSERDBLOGDIR,SQLSYSADMINACCOUNTS,SQLBACKUPDIR,SQLTEMPDBDIR,FAILOVERCLUSTERDISKS,FAILOVERCLUSTERGROUP,INSTALLSQLDATADIR,FAILOVERCLUSTERNETWORKNAME,QUIET,FAILOVERCLUSTERIPADDRESSES,SQLUSERDBDIR,IACCEPTSQLSERVERLICENSETERMS,ACTION
VERBOSE: Verifying actual setup arguments against expected setup arguments
      [+] Should pass proper parameters to setup 1.36s
VERBOSE: Verifying setup argument count (expected vs actual)
VERBOSE: Expected: FailoverClusterGroup,Action,FailoverClusterDisks,InstanceName,FailoverClusterNetworkName,SkipRules,InstallSQLDataDir,FailoverClusterIPAddresses,Features,Quiet,SQLSysAdminAccounts,IAcceptSQLServerLicenseTerms
VERBOSE: Actual: FEATURES,QUIET,ACTION,FAILOVERCLUSTERDISKS,INSTANCENAME,FAILOVERCLUSTERNETWORKNAME,SKIPRULES,FAILOVERCLUSTERGROUP,INSTALLSQLDATADIR,SQLSYSADMINACCOUNTS,IACCEPTSQLSERVERLICENSETERMS,FAILOVERCLUSTERIPADDRESSES
VERBOSE: Verifying actual setup arguments against expected setup arguments
      [+] Should pass proper parameters to setup when only InstallSQLDataDir is assigned a path 789ms
VERBOSE: Verifying setup argument count (expected vs actual)
VERBOSE: Expected: 

The DSC configuration that is using the resource (as detailed as possible):
n/a

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a

What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a

Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the SqlSetup unit test that emits the setup-argument VERBOSE messages and compare it with the integration test's use of -ErrorVariable. Make the verbose output appear only when the It-block fails, then confirm passing tests no longer produce the repeated messages and that failures still show parameter differences.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
testing-qa
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.