-
Notifications
You must be signed in to change notification settings - Fork 53
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
chore: set environment variable using extensions in tests #2798
Conversation
private static final String DEFAULT_ENDPOINT = "test.googleapis.com:443"; | ||
private static final String DEFAULT_MTLS_ENDPOINT = "test.mtls.googleapis.com:443"; | ||
private EndpointContext.Builder defaultEndpointContextBuilder; | ||
private StatusCode statusCode; | ||
|
||
@SystemStub private final EnvironmentVariables environmentVariables = new EnvironmentVariables(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's no straightforward way to set environment variables in Junit 5.
I followed this post to use systemstubs.
The library is under MIT license and we're free to use. See go/licensetable.
Quality Gate passed for 'gapic-generator-java-root'Issues Measures |
Quality Gate passed for 'java_showcase_integration_tests'Issues Measures |
Fix: #2785