Skip to content

Commit 75624f3

Browse files
Copilotjohlju
andcommitted
Address PR feedback: remove service start/stop and fix error message
Co-authored-by: johlju <7189721+johlju@users.noreply.github.com>
1 parent 83aa428 commit 75624f3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tests/Integration/Commands/Get-SqlDscDatabasePermission.Integration.Tests.ps1

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BeforeDiscovery {
1919
}
2020
catch [System.IO.FileNotFoundException]
2121
{
22-
throw 'DscResource.Test module dependency not found. Please run ".\build.ps1 -ResolveDependency -Tasks build" first.'
22+
throw 'DscResource.Test module dependency not found. Please run ".\build.ps1 -ResolveDependency -Tasks noop" first.'
2323
}
2424
}
2525

@@ -31,9 +31,6 @@ BeforeAll {
3131

3232
Describe 'Get-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integration_SQL2019', 'Integration_SQL2022') {
3333
BeforeAll {
34-
# Starting the named instance SQL Server service prior to running tests.
35-
Start-Service -Name 'MSSQL$DSCSQLTEST' -Verbose -ErrorAction 'Stop'
36-
3734
$script:mockInstanceName = 'DSCSQLTEST'
3835

3936
$mockSqlAdministratorUserName = 'SqlAdmin' # Using computer name as NetBIOS name throw exception.
@@ -66,9 +63,6 @@ Describe 'Get-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integrati
6663
}
6764

6865
Disconnect-SqlDscDatabaseEngine -ServerObject $script:serverObject
69-
70-
# Stop the named instance SQL Server service to save memory on the build worker.
71-
Stop-Service -Name 'MSSQL$DSCSQLTEST' -Verbose -ErrorAction 'Stop'
7266
}
7367

7468
Context 'When connecting to SQL Server instance' {
@@ -209,4 +203,4 @@ Describe 'Get-SqlDscDatabasePermission' -Tag @('Integration_SQL2017', 'Integrati
209203
}
210204
}
211205
}
212-
}
206+
}

0 commit comments

Comments
 (0)