go.testEnvFile doesn't substitute nested env variables #1902
Labels
debug/config
Issues for config discrepancies b/n settings.json, launch.json, launch with F5, run test, debug test
Debug
Issues related to the debugging functionality of the extension.
FeatureRequest
HelpWanted
Issues that are not prioritized by the maintainers. Help is requested from community contributors.
Milestone
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Share all the settings with the
go.
or["go"]
orgopls
prefixes.Describe the bug
A clear and concise description of what the bug.
A clear and concise description of what you expected to happen.
When using environmental variables with tests (setting "go.testEnvFile": ".env"), if the env file contains variables built off of others, they don't get replaced. Eg. If you have the following:
PORT=1234 DB_URL=localhost:$PORT
What gets loaded into the environment for the DB_URL is the literal string "localhost:$PORT" without substitution.
Additionally, the only mention of how to use environmental variables for tests is the final two comments on this PR implementing it. It should be added to docs somewhere.
Steps to reproduce the behavior:
debug test
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: