Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xSQLServerNetwork: Tests report Script Analyzer warnings that need to be fixed #261

Closed
johlju opened this issue Dec 28, 2016 · 0 comments · Fixed by #538
Closed

xSQLServerNetwork: Tests report Script Analyzer warnings that need to be fixed #261

johlju opened this issue Dec 28, 2016 · 0 comments · Fixed by #538
Assignees
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Dec 28, 2016

Details of the scenario you try and problem that is occurring:
Tests report Script Analyzer warnings that need to be fixed:

MSFT_xSQLServerNetwork.psm1 (Line 51): '%' is an alias of 'ForEach-Object'. Alias can introduce possible problems and make scripts hard to maintain. Please consider changing alias to its full content.
MSFT_xSQLServerNetwork.psm1 (Line 166): $null should be on the left side of equality comparisons.

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

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

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Dec 28, 2016
@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Apr 29, 2017
@johlju johlju self-assigned this Apr 29, 2017
johlju added a commit to johlju/SqlServerDsc that referenced this issue May 1, 2017
Refactored some of the code, cleaned up the rest and fixed PSSA rules warnings (issue dsccommunity#261).
johlju added a commit to johlju/SqlServerDsc that referenced this issue May 1, 2017
Refactored some of the code, cleaned up the rest and fixed PSSA rules warnings (issue dsccommunity#261).
johlju added a commit to johlju/SqlServerDsc that referenced this issue May 20, 2017
Refactored some of the code, cleaned up the rest and fixed PSSA rules warnings (issue dsccommunity#261).
johlju added a commit that referenced this issue May 21, 2017
- Changes to xSQLServerNetwork
  - Added optional parameter SQLServer with default value of $env:COMPUTERNAME (issue #528).
  - Added optional parameter RestartTimeout with default value of 120 seconds.
  - Now the resource supports restarting a sql server in a cluster (issue #527 and issue #455).
  - Now the resource allows to set the parameter TcpDynamicPorts to a blank value (partly fixes issue #534). Setting a blank value for parameter TcpDynamicPorts together with a value for parameter TcpPort means that static port will be used.
  - Now the resource will not call Alter() in the Set-TargetResource when there is no change necessary (issue #537).
  - Updated example 1-EnableTcpIpOnCustomStaticPort.
  - Added unit tests (issue #294).
  - Refactored some of the code, cleaned up the rest and fixed PSSA rules warnings (issue #261).
  - If parameter TcpDynamicPort is set to '0' at the same time as TcpPort is set the resource will now throw an error (issue #535).
  - Added examples (issue #536).
  - When TcpDynamicPorts is set to '0' the Test-TargetResource function will no longer fail each time (issue #564).
- Changes to xSQLServerHelper module
  - Added four new helper functions.
    - Register-SqlSmo, Register-SqlWmiManagement and Unregister-SqlAssemblies to handle the creation on the application domain and loading and unloading of the SMO and SqlWmiManagement assemblies.
    - Get-SqlInstanceMajorVersion to get the major SQL version for a specific instance.
  - Fixed typos in comment-based help
@johlju johlju removed the in progress The issue is being actively worked on by someone. label May 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant