@@ -202,6 +202,20 @@ Describe 'Initialize-SqlDscRebuildDatabase' -Tag @('Integration_SQL2017', 'Integ
202202 $sqlService = Get-Service - Name $serviceName - ErrorAction ' Stop'
203203 $sqlService.Status | Should - Be ' Running'
204204 }
205+
206+ It ' Should have the requested TempDB file count' {
207+ $mockSqlAdministratorUserName = ' SqlAdmin'
208+ $mockSqlAdministratorPassword = ConvertTo-SecureString - String ' P@ssw0rd1' - AsPlainText - Force
209+
210+ $sqlAdminCredential = [System.Management.Automation.PSCredential ]::new(
211+ $mockSqlAdministratorUserName ,
212+ $mockSqlAdministratorPassword
213+ )
214+
215+ $server = Connect-SqlDscDatabaseEngine - InstanceName ' DSCSQLTEST' - Credential $sqlAdminCredential - ErrorAction ' Stop'
216+ $server.Databases [' tempdb' ].FileGroups[' PRIMARY' ].Files.Count | Should - Be 8
217+ Disconnect-SqlDscDatabaseEngine - ServerObject $server - ErrorAction ' Stop'
218+ }
205219 }
206220
207221 Context ' When specifying optional SqlCollation parameter' {
@@ -258,6 +272,20 @@ Describe 'Initialize-SqlDscRebuildDatabase' -Tag @('Integration_SQL2017', 'Integ
258272 $sqlService = Get-Service - Name $serviceName - ErrorAction ' Stop'
259273 $sqlService.Status | Should - Be ' Running'
260274 }
275+
276+ It ' Should set the requested server collation' {
277+ $mockSqlAdministratorUserName = ' SqlAdmin'
278+ $mockSqlAdministratorPassword = ConvertTo-SecureString - String ' P@ssw0rd1' - AsPlainText - Force
279+
280+ $mockSqlAdminCredential = [System.Management.Automation.PSCredential ]::new(
281+ $mockSqlAdministratorUserName ,
282+ $mockSqlAdministratorPassword
283+ )
284+
285+ $server = Connect-SqlDscDatabaseEngine - InstanceName ' DSCSQLTEST' - Credential $mockSqlAdminCredential - ErrorAction ' Stop'
286+ $server.Collation | Should - Be ' SQL_Latin1_General_CP1_CI_AS'
287+ Disconnect-SqlDscDatabaseEngine - ServerObject $server - ErrorAction ' Stop'
288+ }
261289 }
262290 }
263291}
0 commit comments