Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates embedded PostgreSQL functionality by moving all related code from cmd/util and ir packages into testutil, making it available for both testing and production use. The refactoring eliminates code duplication and establishes testutil as the single source of truth for embedded PostgreSQL management.
Key Changes:
- Moved embedded PostgreSQL management, version detection, and test helper functions from
cmd/utilandirpackages totestutil - Updated all imports and references across the codebase to use
testutilinstead ofcmd/utilfor embedded PostgreSQL functionality - Added support for nil
testing.Tparameter to enable usage in production code and TestMain contexts
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testutil/postgres.go | Added comprehensive embedded PostgreSQL functionality including version detection, instance management, and test helpers |
| ir/testutil.go | Removed (functionality moved to testutil package) |
| ir/testing.go | Added convenience wrappers that delegate to testutil functions |
| cmd/util/postgres_version.go | Removed (functionality moved to testutil) |
| cmd/util/postgres_version_test.go | Removed (tests moved to testutil) |
| cmd/util/embedded_postgres.go | Removed (functionality moved to testutil) |
| cmd/util/embedded_postgres_test.go | Removed (tests moved to testutil) |
| cmd/util/embedded_postgres_test_helper.go | Removed (functionality moved to testutil) |
| cmd/plan/plan.go | Updated imports to use testutil instead of util for embedded PostgreSQL |
| cmd/apply/apply.go | Updated imports to use testutil instead of util for embedded PostgreSQL |
| cmd/migrate_integration_test.go | Updated imports and type references to use testutil |
| cmd/apply/apply_integration_test.go | Updated imports and type references to use testutil |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fb392a4 to
db0587a
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.