Skip to content
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

Specify environment variables #35

Open
timofurrer opened this issue Feb 20, 2023 · 3 comments
Open

Specify environment variables #35

timofurrer opened this issue Feb 20, 2023 · 3 comments

Comments

@timofurrer
Copy link

What is the proper way to specify some static environment variables to set when running a test for a single workspace?

@sergii4
Copy link
Collaborator

sergii4 commented Mar 9, 2023

why do you need any static env var and what preventing you from setting it up with

os.Setenv("FOO", "1")

?

@mattwoberts
Copy link

I need to do something similar... I have a .test.env that specifies some test env vars for testing my go app.

I use "godotenv" to run these tests:

godotenv -f .test.env go test ./... 

I'm trying to work out how I could do something like this that would allow me to run the tests in neotest - I can't think of anything obvious though that would allow me to do this?

@jetaggart
Copy link

Any updates on how to do this? I have a test suite where I need to configure the logger in test which is done through env vars, any help would be much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants