chore: mark db-dependent tests as needing to run in integration #9041
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.
Description
The definition of
db.ResolveTestPostgres()
is in a file marked with// +build integration
and therefore files that reference it fail to compile when that file is ignored (e.g. when runningmake test
).The agent test does not directly access the DB, but it ends up spinning up some goroutine somewhere that attempts to use an uninitialized
Bun()
and panics (presumably, because there's no DB available to satisfy the initialization of The One Bun in time). When it's run as part ofmake test-intg
instead, it passes.These tests would always run with integration tests anyway, all this changes is that they're ignored if you're only running "unit tests" or some select subset of tests that need to ignore these files in order to compile correctly.
Test Plan
Automated tests still pass
Checklist
docs/release-notes/
.See Release Note for details.