RFC: passing environment variables to go_test
See original GitHub issueSome Go tests need to read some environment variables to load a different set of configurations for test environment. There is no way to pass environment variables to Go tests.
We may need to implement a env
parameter to go_test
, just like java_test.
An alternative may be making --test-runner-env
of buck test
available for Go. It is currently only available for Apple tests.
@mkaczanowski @nemith @styurin @philipjameson @bobyangyf @LLITCHEV What do you think?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
RFC 1408 - IETF
Abstract This document specifies a mechanism for passing environment ... RFC 1408 Telnet Environment Option January 1993 PRINTER This variable is used to ......
Read more >How to pass values to RFC while testing - SAP Community
I have created a RFC .where importing parameter is a table .Now when i am trying to test RFC in tcode se37 i.e...
Read more >env - Go Packages
Package env provides functions to test code that read environment variables or the current working directory.
Read more >Using environment variables in Go tests - YellowDuck.be
When you want to set an environment variable in a Go test, you can use the os.Setenv function. If you have multiple tests, ......
Read more >Set environment variable for Go tests - Stack Overflow
FOO=BAR bash -c 'go list ./... | grep -v vendor | xargs -n1 go test -timeout=3s'. A good explanation why the original command...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tested it. It works. Thank you!
Solved in: https://github.com/facebook/buck/commit/09f844339628ff7505af416ae265844074c5842c