-
Notifications
You must be signed in to change notification settings - Fork 198
Tilt dev env & Tests: Go tests load .env no longer requiring variables injection
#4175
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
pfcoperez
merged 24 commits into
main
from
DBI-640/local-dev-env/e2e/automatic-envvars-injection
Apr 16, 2026
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f702dba
New common test package. Initially contains helper methods to walk up…
pfcoperez 1ae4106
Load `.env` from project using new walk-up tooling.
pfcoperez 522f9f0
Update Tiltfile, `env -f` is not longer needed to pass connection or …
pfcoperez aeac21d
Make connectors tests load env file automatically
pfcoperez 8e1b879
Update docs
pfcoperez bda3a5e
Add connectors test launchers to Tilt
pfcoperez e1db8b1
Add switchboard and flow e2e tests to Tiltfile
pfcoperez 3de2679
Add Tilt buttons to clean-up Go caches, removes cleaning the cache by…
pfcoperez 2e691e2
Make of "Start all test resources" a resource so we can invoke it fro…
pfcoperez a32e948
Fix linting issues
pfcoperez ec5fb5b
PR Comments [Tiltfile]: Fix mongo connector test references and remov…
pfcoperez a54dad5
Tiltfile: Provide all MySQL flavors for all tests, simplify this by f…
pfcoperez a22ea3e
MySQL api tests need PSQL
pfcoperez 05767c1
PR Comments [Tiltfile]: Wrong switchboard MongoDB target
pfcoperez fb162a9
LoadEnv only runs on its first call
pfcoperez 610d3e2
PR Comments [Tiltfile]: Use `-count=1` go test parameter to force at …
pfcoperez 5a51227
PR Comments [Tiltfile]: Improve UX by sorting groups making use of Ti…
pfcoperez 795a41f
Forced timezone with `godotenv`.
pfcoperez 4c545a0
PR Comments [Tiltfile]: Allow parallel test execution up to 10
pfcoperez 3fe8ae6
Fix test isolation: reset loadedEnv before each LoadEnv() call
pfcoperez 497aeae
Fix linting issues
pfcoperez 4747c23
Update all resources filters.
pfcoperez c0b218b
Replace atomic.Bool with sync.Once in LoadEnv
github-actions[bot] 3e9e910
Merge remote-tracking branch 'upstream/main' into DBI-640/local-dev-e…
pfcoperez 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
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
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package utils | ||
|
|
||
| import ( | ||
| "testing" | ||
|
|
||
| "github.com/PeerDB-io/peerdb/flow/internal/testutil" | ||
| ) | ||
|
|
||
| func init() { | ||
| if testing.Testing() { | ||
| testutil.LoadEnv() | ||
| } | ||
| } |
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.
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.