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

Add an environment variable to enable CI-only tests (that are skipped locally) #18849

Open
rileykarson opened this issue Jul 25, 2024 · 2 comments

Comments

@rileykarson
Copy link
Collaborator

What kind of contribution is this issue about?

Other (specify in details)

Details

Tests like

# Outside of automated terraform-provider-google CI tests, these values must be of actual AWS resources for the test to pass.
can only pass in CI, and will always fail locally, preventing developers from using resource wildcards (i.e. TestAccComputeInstance_) to run tests, forcing them to run them one-by-one.

Similar to tests dependent on environment variables like GOOGLE_ORG having a value, we should check for a variable like GOOGLE_CI_ENVIRONMENT=true, skipping the test if not enabled. That'll mean that contributors can run resource suites locally successfully, and if they need to run these advanced tests they can break glass by providing the specific env var.

References

No response

@rileykarson rileykarson added this to the Goals milestone Aug 12, 2024
@rileykarson
Copy link
Collaborator Author

As discussed in @wyardley's comment- we could consider adding a gate on some particularly high cost (possibly just within an otherwise lower cost product) as well, whether it's one or multiple vars.

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

No branches or pull requests

2 participants