-
Notifications
You must be signed in to change notification settings - Fork 227
Closed
Labels
testsThe issue or pull request is about tests only.The issue or pull request is about tests only.
Description
Description
Some integration tests are starting SQL Server services and establishing database connections in their BeforeAll/AfterAll blocks even when the tests themselves don't require actual database connectivity.
Problem
This creates unnecessary overhead in the test suite by:
- Starting SQL Server services that aren't used
- Creating database connections that aren't needed
- Consuming additional memory and processing time on build workers
- Slowing down test execution
Proposed Solution
Audit all integration tests to identify which ones actually require database connectivity and remove the database startup/connection setup from tests that don't need it.
Example
Tests like ConvertFrom-SqlDscDatabasePermission.Integration.Tests.ps1 may not need the full database setup if they're only testing data conversion functionality.
References
- PR: Add integration test for ConvertFrom-SqlDscDatabasePermission command #2274
- Comment: Add integration test for ConvertFrom-SqlDscDatabasePermission command #2274 (comment)
Acceptance Criteria
- Audit all integration tests in
tests/Integration/Commands/ - Identify tests that don't actually use database connectivity
- Remove unnecessary BeforeAll/AfterAll database setup blocks
- Verify tests still pass after optimization
- Document which tests require database connectivity vs those that don't
Metadata
Metadata
Assignees
Labels
testsThe issue or pull request is about tests only.The issue or pull request is about tests only.