-
Notifications
You must be signed in to change notification settings - Fork 227
Add commands for SQL Server database management #2148
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
Add commands for SQL Server database management #2148
Conversation
Co-authored-by: johlju <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2148 +/- ##
=====================================
- Coverage 94% 94% -1%
=====================================
Files 122 127 +5
Lines 8382 8558 +176
=====================================
+ Hits 7939 8074 +135
- Misses 443 484 +41
🚀 New features to boost your workflow:
|
- Remove trailing whitespace from line 111 in Remove-SqlDscDatabase.ps1 - Add exactly one blank line at the end of all new database command files - Resolves PSAvoidTrailingWhitespace linting rule violation Co-authored-by: johlju <[email protected]>
|
@copilot add integration tests for |
…e commands Co-authored-by: johlju <[email protected]>
I've added integration tests for The new integration tests cover:
All database integration tests have been added to Group 2 in the Completed in commit 07097b3. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the WalkthroughAdds five new public PowerShell cmdlets for SQL Server database lifecycle (Get, New, Set, Remove, Test), their localization strings, unit and integration Pester tests, a CHANGELOG entry, and inserts the new integration tests into the CI pipeline. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant PS as PowerShell
participant Cmd as New-SqlDscDatabase
participant SMO as SMO Server/Database
User->>PS: Invoke New-SqlDscDatabase -ServerObject -Name ...
PS->>Cmd: Bind parameters
alt Refresh specified
Cmd->>SMO: Server.Databases.Refresh()
end
Cmd->>SMO: Check if database exists
alt Not exists and ShouldProcess approved
Cmd->>SMO: new Database(Server, Name) & set properties
Cmd->>SMO: Create()
opt OwnerName provided
Cmd->>SMO: SetOwner(OwnerName)
end
Cmd-->>PS: Return Database
else Exists or failure
Cmd-->>PS: Error (already exists / create failed)
end
sequenceDiagram
autonumber
actor User
participant PS as PowerShell
participant Cmd as Set-SqlDscDatabase
participant SMO as SMO Server/Database
User->>PS: Invoke Set-SqlDscDatabase (-ServerObject|-DatabaseObject) ...
PS->>Cmd: Bind parameters
alt ServerObject set
opt Refresh
Cmd->>SMO: Server.Databases.Refresh()
end
Cmd->>SMO: Resolve Database by Name
else DatabaseObject set
Cmd->>SMO: Use provided Database
end
Cmd->>SMO: Validate Collation/CompatibilityLevel
alt ShouldProcess approved
Cmd->>SMO: Update properties (Collation/Compat/Recovery/Owner)
Cmd->>SMO: Alter()
opt PassThru
Cmd-->>PS: Return Database
end
else
Cmd-->>PS: No changes / skip
end
sequenceDiagram
autonumber
actor User
participant PS as PowerShell
participant Cmd as Remove-SqlDscDatabase
participant SMO as SMO Server/Database
User->>PS: Invoke Remove-SqlDscDatabase (-ServerObject|-DatabaseObject) [-Force]
PS->>Cmd: Bind parameters
alt ServerObject set
opt Refresh
Cmd->>SMO: Server.Databases.Refresh()
end
Cmd->>SMO: Resolve Database by Name
else DatabaseObject set
Cmd->>SMO: Use provided Database
end
Cmd->>Cmd: Guard against system DBs
alt ShouldProcess approved
Cmd->>SMO: Database.Drop()
Cmd-->>PS: Complete (no output)
else
Cmd-->>PS: No action
end
sequenceDiagram
autonumber
actor User
participant PS as PowerShell
participant Cmd as Get/Test-SqlDscDatabase
participant SMO as SMO Server/Database
User->>PS: Invoke Get-/Test-SqlDscDatabase -ServerObject [-Name] [-Refresh]
PS->>Cmd: Bind parameters
opt Refresh
Cmd->>SMO: Server.Databases.Refresh()
end
alt Get
Cmd->>SMO: Fetch by Name or all
Cmd-->>PS: Database[] or (error + empty)
else Test
Cmd->>SMO: Evaluate existence and optional properties
Cmd-->>PS: Boolean result
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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.
Actionable comments posted: 17
🧹 Nitpick comments (31)
source/Public/Test-SqlDscDatabase.ps1 (1)
50-51: Update OutputType documentation formatThe output type documentation should use brackets instead of backticks for consistency with PowerShell documentation standards.
- `[System.Boolean]` + [System.Boolean]tests/Unit/Public/Test-SqlDscDatabase.Tests.ps1 (1)
68-69: Consider adding explicit -Force on ScriptMethodWhile the current implementation adds
-Forceto the pipeline result correctly, consider adding it directly to theAdd-Membercall for theScriptMethodfor clarity and consistency.} | Add-Member -MemberType 'ScriptMethod' -Name 'Refresh' -Value { # Mock implementation - } -PassThru -Force + } -Force -PassThrusource/Public/New-SqlDscDatabase.ps1 (1)
52-54: Update OutputType documentation formatSimilar to Test-SqlDscDatabase, the output type documentation should use brackets instead of backticks.
- `[Microsoft.SqlServer.Management.Smo.Database]` + [Microsoft.SqlServer.Management.Smo.Database]tests/Unit/Public/Get-SqlDscDatabase.Tests.ps1 (1)
80-80: Remove trailing whitespaceLine 80 has trailing whitespace that should be removed.
- Mock -CommandName 'Write-Verbose' - + Mock -CommandName 'Write-Verbose' +tests/Unit/Public/Set-SqlDscDatabase.Tests.ps1 (4)
36-44: Do not set InModuleScope defaults for public-command unit testsPer guidelines, public command unit tests should not use InModuleScope. You’re not using it anyway; drop the defaults and matching cleanup.
- $PSDefaultParameterValues['InModuleScope:ModuleName'] = $script:dscModuleName $PSDefaultParameterValues['Mock:ModuleName'] = $script:dscModuleName $PSDefaultParameterValues['Should:ModuleName'] = $script:dscModuleName- $PSDefaultParameterValues.Remove('InModuleScope:ModuleName') $PSDefaultParameterValues.Remove('Mock:ModuleName') $PSDefaultParameterValues.Remove('Should:ModuleName')
98-102: Strengthen assertion by verifying property change (RecoveryModel)Validate that Set-SqlDscDatabase actually changed the property.
- { Set-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabase' -RecoveryModel 'Simple' -Force } | Should -Not -Throw + { Set-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabase' -RecoveryModel 'Simple' -Force } | Should -Not -Throw + $mockServerObject.Databases['TestDatabase'].RecoveryModel | Should -Be 'Simple'
104-111: Assert returned object reflects updated state with -PassThruAlso assert the changed property on the object returned.
$result = Set-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabase' -RecoveryModel 'Simple' -Force -PassThru $result | Should -Not -BeNullOrEmpty $result.Name | Should -Be 'TestDatabase' + $result.RecoveryModel | Should -Be 'Simple'
83-90: Optionally verify -Refresh triggers Databases.Refresh()Track and assert a refresh was invoked when -Refresh is passed.
$mockServerObject | Add-Member -MemberType 'ScriptProperty' -Name 'Databases' -Value { - return @{ + return @{ 'TestDatabase' = $mockDatabaseObject } | Add-Member -MemberType 'ScriptMethod' -Name 'Refresh' -Value { - # Mock implementation + $script:refreshCalled = $true } -PassThru -Force } -ForceAdditional test to add (outside the shown range):
It 'Should call Databases.Refresh() when -Refresh is specified' { $script:refreshCalled = $false { Set-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabase' -RecoveryModel 'Simple' -Refresh -Force } | Should -Not -Throw $script:refreshCalled | Should -BeTrue }source/Public/Get-SqlDscDatabase.ps1 (1)
74-88: Return a typed empty array on not-found and use enum ErrorCategoryImproves consumer ergonomics and aligns with best practices.
if (-not $databaseObject) { Write-Verbose -Message ($script:localizedData.Database_NotFound -f $Name) $missingDatabaseMessage = $script:localizedData.Database_NotFound -f $Name $writeErrorParameters = @{ Message = $missingDatabaseMessage - Category = 'ObjectNotFound' + Category = [System.Management.Automation.ErrorCategory]::ObjectNotFound ErrorId = 'GSDD0001' # cspell: disable-line TargetObject = $Name } Write-Error @writeErrorParameters + $databaseObject = @() }tests/Integration/Commands/New-SqlDscDatabase.Integration.Tests.ps1 (3)
29-30: Fail fast on module import in integration testsAdd -ErrorAction Stop to surface failures early.
- Import-Module -Name $script:dscModuleName + Import-Module -Name $script:dscModuleName -ErrorAction 'Stop'
45-46: Ensure Connect errors fail the test immediatelyPass -ErrorAction Stop to Connect-SqlDscDatabaseEngine.
- $script:serverObject = Connect-SqlDscDatabaseEngine -InstanceName $script:mockInstanceName -Credential $script:mockSqlAdminCredential + $script:serverObject = Connect-SqlDscDatabaseEngine -InstanceName $script:mockInstanceName -Credential $script:mockSqlAdminCredential -ErrorAction 'Stop'
101-118: Prefer AfterEach cleanup over try/finally and fail fast inside testSimplify cleanup and ensure terminating errors are surfaced.
- try { - $result = New-SqlDscDatabase -ServerObject $script:serverObject -Name $uniqueName -Refresh -Force + try { + $result = New-SqlDscDatabase -ServerObject $script:serverObject -Name $uniqueName -Refresh -Force -ErrorAction 'Stop' @@ - $dbToRemove = Get-SqlDscDatabase -ServerObject $script:serverObject -Name $uniqueName -ErrorAction 'SilentlyContinue' + $dbToRemove = Get-SqlDscDatabase -ServerObject $script:serverObject -Name $uniqueName -ErrorAction 'SilentlyContinue' if ($dbToRemove) { - Remove-SqlDscDatabase -DatabaseObject $dbToRemove -Force + Remove-SqlDscDatabase -DatabaseObject $dbToRemove -Force -ErrorAction 'Stop' } }Optional alternative (cleaner):
Context 'When using the Refresh parameter' { AfterEach { $db = Get-SqlDscDatabase -ServerObject $script:serverObject -Name $uniqueName -ErrorAction 'SilentlyContinue' if ($db) { Remove-SqlDscDatabase -DatabaseObject $db -Force -ErrorAction 'Stop' } } It 'Should refresh the database collection before creating' { $uniqueName = 'SqlDscTestRefresh_' + (Get-Random) $result = New-SqlDscDatabase -ServerObject $script:serverObject -Name $uniqueName -Refresh -Force -ErrorAction 'Stop' $result | Should -Not -BeNullOrEmpty $result.Name | Should -Be $uniqueName } }tests/Integration/Commands/Get-SqlDscDatabase.Integration.Tests.ps1 (3)
29-30: Fail fast on module import in integration testsAdd -ErrorAction Stop.
- Import-Module -Name $script:dscModuleName + Import-Module -Name $script:dscModuleName -ErrorAction 'Stop'
45-46: Ensure Connect errors fail the test immediatelyAdd -ErrorAction Stop.
- $script:serverObject = Connect-SqlDscDatabaseEngine -InstanceName $script:mockInstanceName -Credential $script:mockSqlAdminCredential + $script:serverObject = Connect-SqlDscDatabaseEngine -InstanceName $script:mockInstanceName -Credential $script:mockSqlAdminCredential -ErrorAction 'Stop'
55-74: Optionally add -ErrorAction Stop to Get calls that must succeedKeeps failures obvious; style consistency with guidelines.
- $result = Get-SqlDscDatabase -ServerObject $script:serverObject + $result = Get-SqlDscDatabase -ServerObject $script:serverObject -ErrorAction 'Stop'Apply similarly where success is expected (Lines 68, 79, 100).
tests/Integration/Commands/Remove-SqlDscDatabase.Integration.Tests.ps1 (4)
29-30: Fail fast on module importAdd -ErrorAction Stop.
- Import-Module -Name $script:dscModuleName + Import-Module -Name $script:dscModuleName -ErrorAction 'Stop'
45-46: Ensure Connect errors fail the test immediatelyAdd -ErrorAction Stop.
- $script:serverObject = Connect-SqlDscDatabaseEngine -InstanceName $script:mockInstanceName -Credential $script:mockSqlAdminCredential + $script:serverObject = Connect-SqlDscDatabaseEngine -InstanceName $script:mockInstanceName -Credential $script:mockSqlAdminCredential -ErrorAction 'Stop'
82-111: Add -ErrorAction Stop for reliable signal on failuresApply to New/Get/Remove and add AfterEach cleanup for the context.
- New-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameForObject -Force + New-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameForObject -Force -ErrorAction 'Stop' @@ - $databaseObject = Get-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameForObject + $databaseObject = Get-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameForObject -ErrorAction 'Stop' @@ - Remove-SqlDscDatabase -DatabaseObject $databaseObject -Force + Remove-SqlDscDatabase -DatabaseObject $databaseObject -Force -ErrorAction 'Stop' @@ - $databaseObject | Remove-SqlDscDatabase -Force + $databaseObject | Remove-SqlDscDatabase -Force -ErrorAction 'Stop'Recommended AfterEach (add outside shown range):
AfterEach { $db = Get-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameForObject -ErrorAction 'SilentlyContinue' if ($db) { Remove-SqlDscDatabase -DatabaseObject $db -Force -ErrorAction 'Stop' } }
135-149: Use -ErrorAction Stop in refresh scenario and ensure cleanupAdds reliability to the refresh test.
- New-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameRefresh -Force + New-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameRefresh -Force -ErrorAction 'Stop' @@ - Remove-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameRefresh -Refresh -Force + Remove-SqlDscDatabase -ServerObject $script:serverObject -Name $script:testDatabaseNameRefresh -Refresh -Force -ErrorAction 'Stop'source/Public/Remove-SqlDscDatabase.ps1 (3)
101-105: Use ObjectNotFound for missing database and prefer $null-left comparisonMore accurate error category and style per guidelines.
- if (-not $DatabaseObject) + if ($null -eq $DatabaseObject) { $errorMessage = $script:localizedData.Database_NotFound -f $Name - New-InvalidOperationException -Message $errorMessage + New-ObjectNotFoundException -Message $errorMessage }
121-126: Align ShouldProcess pattern and honor -Force/-Confirm semanticsAdopt the required variable names and Force pattern so -Force truly bypasses confirmation prompts.
- $verboseDescriptionMessage = $script:localizedData.Database_Remove_ShouldProcessVerboseDescription -f $Name, $DatabaseObject.Parent.InstanceName - $verboseWarningMessage = $script:localizedData.Database_Remove_ShouldProcessVerboseWarning -f $Name - $captionMessage = $script:localizedData.Database_Remove_ShouldProcessCaption + $descriptionMessage = $script:localizedData.Database_Remove_ShouldProcessVerboseDescription -f $Name, $DatabaseObject.Parent.InstanceName + $confirmationMessage = $script:localizedData.Database_Remove_ShouldProcessVerboseWarning -f $Name + $captionMessage = $script:localizedData.Database_Remove_ShouldProcessCaption + + if ($Force.IsPresent -and -not $Confirm) + { + $ConfirmPreference = 'None' + } - if ($Force.IsPresent -or $PSCmdlet.ShouldProcess($verboseDescriptionMessage, $verboseWarningMessage, $captionMessage)) + if ($Force.IsPresent -or $PSCmdlet.ShouldProcess($descriptionMessage, $confirmationMessage, $captionMessage)) {
91-97: De-duplicate system database guardDefine the system list once to avoid drift between branches.
- $systemDatabases = @('master', 'model', 'msdb', 'tempdb') + $systemDatabases = @('master', 'model', 'msdb', 'tempdb') ... - $systemDatabases = @('master', 'model', 'msdb', 'tempdb') + # Uses the same $systemDatabases as aboveAlso applies to: 112-118
source/Public/Set-SqlDscDatabase.ps1 (3)
126-131: Use ObjectNotFound for missing database and prefer $null-left comparison- if (-not $DatabaseObject) + if ($null -eq $DatabaseObject) { $errorMessage = $script:localizedData.Database_NotFound -f $Name - New-InvalidOperationException -Message $errorMessage + New-ObjectNotFoundException -Message $errorMessage }
171-176: Align ShouldProcess pattern and honor -Force/-Confirm semantics- $verboseDescriptionMessage = $script:localizedData.Database_Set_ShouldProcessVerboseDescription -f $Name, $ServerObject.InstanceName - $verboseWarningMessage = $script:localizedData.Database_Set_ShouldProcessVerboseWarning -f $Name - $captionMessage = $script:localizedData.Database_Set_ShouldProcessCaption + $descriptionMessage = $script:localizedData.Database_Set_ShouldProcessVerboseDescription -f $Name, $ServerObject.InstanceName + $confirmationMessage = $script:localizedData.Database_Set_ShouldProcessVerboseWarning -f $Name + $captionMessage = $script:localizedData.Database_Set_ShouldProcessCaption + + if ($Force.IsPresent -and -not $Confirm) + { + $ConfirmPreference = 'None' + } - if ($Force.IsPresent -or $PSCmdlet.ShouldProcess($verboseDescriptionMessage, $verboseWarningMessage, $captionMessage)) + if ($Force.IsPresent -or $PSCmdlet.ShouldProcess($descriptionMessage, $confirmationMessage, $captionMessage)) {
142-156: Guard for unknown future SQL versions in compatibility mappingIf VersionMajor isn’t in the map, validation will always fail. Fallback to the highest known level.
- if ($CompatibilityLevel -notin $supportedCompatibilityLevels.$($ServerObject.VersionMajor)) + $levelsForVersion = $supportedCompatibilityLevels[$ServerObject.VersionMajor] + if (-not $levelsForVersion) + { + $levelsForVersion = $supportedCompatibilityLevels[ + (($supportedCompatibilityLevels.Keys | Measure-Object -Maximum).Maximum) + ] + } + + if ($CompatibilityLevel -notin $levelsForVersion) { $errorMessage = $script:localizedData.Database_InvalidCompatibilityLevel -f $CompatibilityLevel, $ServerObject.InstanceName New-ObjectNotFoundException -Message $errorMessage }tests/Unit/Public/New-SqlDscDatabase.Tests.ps1 (3)
36-39: Avoid InModuleScope defaults for public command testsGuidelines: public command tests should not use InModuleScope. The default value isn’t used here—safe to remove.
- $PSDefaultParameterValues['InModuleScope:ModuleName'] = $script:dscModuleName $PSDefaultParameterValues['Mock:ModuleName'] = $script:dscModuleName $PSDefaultParameterValues['Should:ModuleName'] = $script:dscModuleName
54-69: Assert SMO actions were invoked (Create/SetOwner) for stronger behavior checksUse flags in the stub to verify calls, aligning with prior project practice.
BeforeAll { + $script:createCalled = $false + $script:setOwnerCalled = $false @@ - Mock -CommandName 'New-Object' -ParameterFilter { $TypeName -eq 'Microsoft.SqlServer.Management.Smo.Database' } -MockWith { + Mock -CommandName 'New-Object' -ParameterFilter { $TypeName -eq 'Microsoft.SqlServer.Management.Smo.Database' } -MockWith { $mockDatabaseObject = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Database' @@ - $mockDatabaseObject | Add-Member -MemberType 'ScriptMethod' -Name 'Create' -Value { - # Mock implementation - } -Force + $mockDatabaseObject | Add-Member -MemberType 'ScriptMethod' -Name 'Create' -Value { + $script:createCalled = $true + } -Force $mockDatabaseObject | Add-Member -MemberType 'ScriptMethod' -Name 'SetOwner' -Value { param($OwnerName) - # Mock implementation + $script:setOwnerCalled = $true } -Force return $mockDatabaseObject } @@ It 'Should create a database successfully with minimal parameters' { @@ $result.Name | Should -Be 'TestDatabase' + $script:createCalled | Should -BeTrue @@ It 'Should create a database with specified properties' { @@ $result.CompatibilityLevel | Should -Be 'Version150' + $script:createCalled | Should -BeTrue + $script:setOwnerCalled | Should -BeTrue }Also applies to: 70-85, 87-95, 97-107
124-139: Brittle __AllParameterSets string comparisonTo reduce brittleness, prefer asserting presence/mandatory flags on individual parameters rather than full ToString().
tests/Unit/Public/Remove-SqlDscDatabase.Tests.ps1 (3)
36-39: Avoid InModuleScope defaults for public command testsNot used—remove per guidelines.
- $PSDefaultParameterValues['InModuleScope:ModuleName'] = $script:dscModuleName $PSDefaultParameterValues['Mock:ModuleName'] = $script:dscModuleName $PSDefaultParameterValues['Should:ModuleName'] = $script:dscModuleName
52-76: Verify Drop() was called when removal succeedsAssert the destructive action occurred.
BeforeAll { + $script:dropCalled = $false @@ - $mockDatabaseObject | Add-Member -MemberType 'ScriptMethod' -Name 'Drop' -Value { - # Mock implementation - } -Force + $mockDatabaseObject | Add-Member -MemberType 'ScriptMethod' -Name 'Drop' -Value { + $script:dropCalled = $true + } -Force @@ It 'Should remove database successfully' { @@ - { Remove-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabase' -Force } | Should -Not -Throw + { Remove-SqlDscDatabase -ServerObject $mockServerObject -Name 'TestDatabase' -Force } | Should -Not -Throw + $script:dropCalled | Should -BeTrue }Also applies to: 78-83
99-111: Add a system-database guard test for DatabaseObject parameter setCovers the second branch of the protection logic.
BeforeAll { $mockDatabaseObject = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Database' - $mockDatabaseObject | Add-Member -MemberType 'NoteProperty' -Name 'Name' -Value 'TestDatabase' -Force + $mockDatabaseObject | Add-Member -MemberType 'NoteProperty' -Name 'Name' -Value 'TestDatabase' -Force @@ } It 'Should remove database successfully using database object' { @@ } + +It 'Should throw when database object is a system database' { + $sysDb = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Database' + $sysDb | Add-Member -MemberType 'NoteProperty' -Name 'Name' -Value 'master' -Force + $sysDb | Add-Member -MemberType 'ScriptProperty' -Name 'Parent' -Value { + $s = New-Object -TypeName 'Microsoft.SqlServer.Management.Smo.Server' + $s | Add-Member -MemberType 'NoteProperty' -Name 'InstanceName' -Value 'TestInstance' -Force + return $s + } -Force + { Remove-SqlDscDatabase -DatabaseObject $sysDb -Force } | Should -Throw -ExpectedMessage '*Cannot remove system database*' +}Also applies to: 113-118
tests/Integration/Commands/Test-SqlDscDatabase.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@CodeRabbit review |
Integration tests for
All database integration tests are included in Group 2 of the |
johlju
left a comment
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.
@johlju reviewed 4 of 5 files at r2, 1 of 4 files at r3, 2 of 4 files at r5, 2 of 6 files at r6, 4 of 4 files at r7, 1 of 1 files at r8, 5 of 5 files at r10, all commit messages.
Reviewable status: all files reviewed, 29 unresolved discussions (waiting on @copilot)
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.
@copilot Revert the change to this file
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.
Reverted the build.ps1 file mode change in commit d262457.
Co-authored-by: johlju <[email protected]>
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is