Skip to content

Commit de117cc

Browse files
committed
Remove redundant service start/stop in Disconnect-SqlDscDatabaseEngine integration tests
1 parent 028da07 commit de117cc

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

tests/Integration/Commands/Disconnect-SqlDscDatabaseEngine.Integration.Tests.ps1

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ Describe 'Disconnect-SqlDscDatabaseEngine' -Tag @('Integration_SQL2017', 'Integr
3636
}
3737

3838
Context 'When disconnecting from the default instance' {
39-
BeforeAll {
40-
# Starting the default instance SQL Server service prior to running tests.
41-
Start-Service -Name 'MSSQLSERVER' -Verbose -ErrorAction 'Stop'
42-
}
43-
44-
AfterAll {
45-
# Stop the default instance SQL Server service to save memory on the build worker.
46-
Stop-Service -Name 'MSSQLSERVER' -Verbose -ErrorAction 'Stop'
47-
}
48-
4939
It 'Should have the default instance SQL Server service started' {
5040
$getServiceResult = Get-Service -Name 'MSSQLSERVER' -ErrorAction 'Stop'
5141

@@ -104,16 +94,6 @@ Describe 'Disconnect-SqlDscDatabaseEngine' -Tag @('Integration_SQL2017', 'Integr
10494
}
10595

10696
Context 'When disconnecting from a named instance' {
107-
BeforeAll {
108-
# Starting the named instance SQL Server service prior to running tests.
109-
Start-Service -Name 'MSSQL$DSCSQLTEST' -Verbose -ErrorAction 'Stop'
110-
}
111-
112-
AfterAll {
113-
# Stop the named instance SQL Server service to save memory on the build worker.
114-
Stop-Service -Name 'MSSQL$DSCSQLTEST' -Verbose -ErrorAction 'Stop'
115-
}
116-
11797
It 'Should have the named instance SQL Server service started' {
11898
$getServiceResult = Get-Service -Name 'MSSQL$DSCSQLTEST' -ErrorAction 'Stop'
11999

0 commit comments

Comments
 (0)