-
Notifications
You must be signed in to change notification settings - Fork 225
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
Get-SqlDscAudit
: Name
no longer mandatory
#1850
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1850 +/- ##
====================================
Coverage 92% 92%
====================================
Files 85 85
Lines 7614 7623 +9
====================================
+ Hits 7012 7021 +9
Misses 602 602
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions
source/Classes/020.SqlAudit.ps1
line 263 at r1 (raw file):
$serverObject = $this.GetServerObject() $auditObject = $serverObject |
To avoid a potential problem with wrong type is returned, make the same workaround as in Remove-SqlDscAudit
.
# If this command does not find the audit it will throw an exception.
$auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters
# Pick the only object in the array.
$AuditObject = $auditObjectArray | Select-Object -First 1
Code quote:
$auditObject = $serverObject |
Get-SqlDscAudit -Name $properties.Name -ErrorAction 'SilentlyContinue' |
Select-Object -First 1
source/Classes/020.SqlAudit.ps1
line 353 at r1 (raw file):
if ($this.Ensure -eq [Ensure]::Present) { $auditObject = $serverObject |
To avoid a potential problem with wrong type is returned, make the same workaround as in Remove-SqlDscAudit
.
# If this command does not find the audit it will throw an exception.
$auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters
# Pick the only object in the array.
$AuditObject = $auditObjectArray | Select-Object -First 1
Code quote:
$auditObject = $serverObject |
Get-SqlDscAudit -Name $this.Name -ErrorAction 'Stop' |
Select-Object -First 1
source/Public/Disable-SqlDscAudit.ps1
line 89 at r1 (raw file):
# If this command does not find the audit it will throw an exception. $AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters | Select-Object -First 1
To avoid a potential problem with wrong type is returned, make the same workaround as in Remove-SqlDscAudit
.
# If this command does not find the audit it will throw an exception.
$auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters
# Pick the only object in the array.
$AuditObject = $auditObjectArray | Select-Object -First 1
Code quote:
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
source/Public/Enable-SqlDscAudit.ps1
line 88 at r1 (raw file):
# If this command does not find the audit it will throw an exception. $AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
To avoid a potential problem with wrong type is returned, make the same workaround as in Remove-SqlDscAudit
.
# If this command does not find the audit it will throw an exception.
$auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters
# Pick the only object in the array.
$AuditObject = $auditObjectArray | Select-Object -First 1
Code quote:
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
source/Public/New-SqlDscAudit.ps1
line 217 at r1 (raw file):
} $auditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
To avoid a potential problem with wrong type is returned, make the same workaround as in Remove-SqlDscAudit
.
# If this command does not find the audit it will throw an exception.
$auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters
# Pick the only object in the array.
$AuditObject = $auditObjectArray | Select-Object -First 1
Code quote:
$auditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
source/Public/Set-SqlDscAudit.ps1
line 262 at r1 (raw file):
} $AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
To avoid a potential problem with wrong type is returned, make the same workaround as in Remove-SqlDscAudit
.
# If this command does not find the audit it will throw an exception.
$auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters
# Pick the only object in the array.
$AuditObject = $auditObjectArray | Select-Object -First 1
Code quote:
$AuditObject = Get-SqlDscAudit @getSqlDscAuditParameters |
Select-Object -First 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 4 of 9 files reviewed, all discussions resolved (waiting on @johlju)
source/Classes/020.SqlAudit.ps1
line 263 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
To avoid a potential problem with wrong type is returned, make the same workaround as in
Remove-SqlDscAudit
.# If this command does not find the audit it will throw an exception. $auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters # Pick the only object in the array. $AuditObject = $auditObjectArray | Select-Object -First 1
Done
source/Classes/020.SqlAudit.ps1
line 353 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
To avoid a potential problem with wrong type is returned, make the same workaround as in
Remove-SqlDscAudit
.# If this command does not find the audit it will throw an exception. $auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters # Pick the only object in the array. $AuditObject = $auditObjectArray | Select-Object -First 1
Done
source/Public/Disable-SqlDscAudit.ps1
line 89 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
To avoid a potential problem with wrong type is returned, make the same workaround as in
Remove-SqlDscAudit
.# If this command does not find the audit it will throw an exception. $auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters # Pick the only object in the array. $AuditObject = $auditObjectArray | Select-Object -First 1
Done
source/Public/Enable-SqlDscAudit.ps1
line 88 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
To avoid a potential problem with wrong type is returned, make the same workaround as in
Remove-SqlDscAudit
.# If this command does not find the audit it will throw an exception. $auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters # Pick the only object in the array. $AuditObject = $auditObjectArray | Select-Object -First 1
Done
source/Public/New-SqlDscAudit.ps1
line 217 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
To avoid a potential problem with wrong type is returned, make the same workaround as in
Remove-SqlDscAudit
.# If this command does not find the audit it will throw an exception. $auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters # Pick the only object in the array. $AuditObject = $auditObjectArray | Select-Object -First 1
Done
source/Public/Set-SqlDscAudit.ps1
line 262 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
To avoid a potential problem with wrong type is returned, make the same workaround as in
Remove-SqlDscAudit
.# If this command does not find the audit it will throw an exception. $auditObjectArray = Get-SqlDscAudit @getSqlDscAuditParameters # Pick the only object in the array. $AuditObject = $auditObjectArray | Select-Object -First 1
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johlju)
Pull Request (PR) description
Get-SqlDscAudit
Name
is no longer mandatory. When left out all the currentaudits are returned.
This Pull Request (PR) fixes the following issues
Get-SqlDscAudit
: Should not enforce to use parameterName
#1812Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
This change is