-
-
Notifications
You must be signed in to change notification settings - Fork 342
test: feature-gate PostgreSQL tests to remove external dependencies from cargo test
#2558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
d53f1f5
Initial plan
Copilot 1448693
Add test-pg feature and update PostgreSQL test gates
Copilot 127895d
Update justfile and CI to use test-pg feature
Copilot 338eb3f
Document test-pg feature in development guide
Copilot 998fbbe
Update justfile
CommanderStorm 7ae0f09
Fix justfile arg passing and gate builder tests with test-pg
Copilot 8e7cb04
Add dedicated test-pg recipe to justfile
Copilot b9e39b0
Make test-pg run only PostgreSQL-specific tests
Copilot 575aa77
Apply suggestion from @CommanderStorm
CommanderStorm 218884e
Apply suggestion from @CommanderStorm
CommanderStorm 2652a0a
Apply suggestion from @CommanderStorm
CommanderStorm 263e091
Apply suggestion from @CommanderStorm
CommanderStorm 5ce0aec
Apply suggestion from @CommanderStorm
CommanderStorm 6b8f02f
Apply suggestions from code review
CommanderStorm 23c6721
Apply suggestions from code review
CommanderStorm b5b49de
Apply suggestion from @CommanderStorm
CommanderStorm c2597d3
Apply suggestion from @CommanderStorm
CommanderStorm af9ce14
Merge branch 'main' into copilot/feature-gate-postgresql-tests
CommanderStorm 31164bf
Apply suggestions from code review
CommanderStorm dc4241e
Apply suggestion from @CommanderStorm
CommanderStorm c84856b
add just to the postgis workflow
CommanderStorm 0d7ebcb
Fix CI port conflict and improve docs formatting
Copilot 461216a
Apply suggestion from @CommanderStorm
CommanderStorm cc6edf4
Apply suggestion from @CommanderStorm
CommanderStorm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,6 +143,23 @@ | |
| just stop # stop test database | ||
| ``` | ||
|
|
||
| ### Testing | ||
|
|
||
| Martin's test suite includes tests that require PostgreSQL to be running and tests that don't. | ||
|
|
||
| ```bash | ||
| # Run tests that don't require PostgreSQL (no external dependencies) | ||
| just test-cargo | ||
|
|
||
| # Run all tests including PostgreSQL tests (requires PostgreSQL running) | ||
| just test # runs all tests | ||
| just test-pg # starts PostgreSQL and runs only PostgreSQL-requiring tests | ||
| ``` | ||
|
|
||
| The `test-pg` feature gates tests that require a live PostgreSQL connection. | ||
| This allows developers to run most tests locally without setting up PostgreSQL, while CI and integration testing can enable these tests explicitly. | ||
| ``` | ||
|
Check failure on line 161 in docs/src/development.md
|
||
CommanderStorm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Pass arguments to commands | ||
|
|
||
| ```bash | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #![cfg(feature = "postgres")] | ||
| #![cfg(feature = "test-pg")] | ||
|
|
||
| use indoc::indoc; | ||
| use insta::assert_yaml_snapshot; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #![cfg(feature = "postgres")] | ||
| #![cfg(feature = "test-pg")] | ||
|
|
||
| use indoc::indoc; | ||
| use insta::assert_yaml_snapshot; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.