mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-28 22:16:04 +00:00
Update CONTRIBUTING to be more clear (#3032)
* Update CONTRIBUTING to be more clear /cc @rambleraptor * Add link to provider reference
This commit is contained in:
parent
4510fb5f4d
commit
76801f0ef0
25
.github/CONTRIBUTING.md
vendored
25
.github/CONTRIBUTING.md
vendored
@ -6,6 +6,9 @@ The following are certain Google Provider-specific things to be aware of when co
|
|||||||
|
|
||||||
## Go
|
## Go
|
||||||
|
|
||||||
|
See the root [README](../README.md) for information on which version of Go you need to use the provider. Generally, this will
|
||||||
|
be the latest stable release of Go.
|
||||||
|
|
||||||
We aim to make the Google Provider a good steward of Go practices. See https://github.com/golang/go/wiki/CodeReviewComments for common Go mistakes that you should attempt to avoid.
|
We aim to make the Google Provider a good steward of Go practices. See https://github.com/golang/go/wiki/CodeReviewComments for common Go mistakes that you should attempt to avoid.
|
||||||
|
|
||||||
## Autogenerated Resources
|
## Autogenerated Resources
|
||||||
@ -30,28 +33,34 @@ If you're developing against Magic Modules, vendoring changes is done automatica
|
|||||||
|
|
||||||
### Running Tests
|
### Running Tests
|
||||||
|
|
||||||
The following environment variables must be set in order to run tests:
|
Configuring tests is similar to configuring the provider; see the [Provider Configuration Reference](https://www.terraform.io/docs/providers/google/provider_reference.html#configuration-reference) for more details. The following environment variables must be set in order to run tests:
|
||||||
|
|
||||||
```
|
```
|
||||||
GOOGLE_PROJECT
|
GOOGLE_PROJECT
|
||||||
GOOGLE_CREDENTIALS or GOOGLE_USE_DEFAULT_CREDENTIALS
|
GOOGLE_CREDENTIALS
|
||||||
```
|
|
||||||
For certain tests, the following variables may also need to be set:
|
|
||||||
```
|
|
||||||
GOOGLE_REGION
|
GOOGLE_REGION
|
||||||
|
GOOGLE_ZONE
|
||||||
|
```
|
||||||
|
|
||||||
|
To ensure that your tests are performed in a region and zone with wide support for GCP feature, `GOOGLE_REGION` should be set to `us-central1` and `GOOGLE_ZONE` to `us-central1-a`.
|
||||||
|
|
||||||
|
For certain tests, primarily those involving project creation, the following variables may also need to be set. Most tests do
|
||||||
|
not require their being set:
|
||||||
|
|
||||||
|
```
|
||||||
GOOGLE_ORG
|
GOOGLE_ORG
|
||||||
GOOGLE_BILLING_ACCOUNT
|
GOOGLE_BILLING_ACCOUNT
|
||||||
```
|
```
|
||||||
|
|
||||||
The only region we support running tests in right now is `us-central1` - some products that are tested here are only available in a few regions, and the only region that all products are available in is `us-central1`.
|
To run a specific test, use `TESTARGS`, such as in:
|
||||||
|
|
||||||
To run a specific test, use a command such as:
|
|
||||||
```
|
```
|
||||||
make testacc TEST=./google TESTARGS='-run=TestAccContainerNodePool_basic'
|
make testacc TEST=./google TESTARGS='-run=TestAccContainerNodePool_basic'
|
||||||
```
|
```
|
||||||
|
|
||||||
The `TESTARGS` variable is regexp-like, so multiple tests can be run in parallel by specifying a common substring of those tests (for example, `TestAccContainerNodePool` to run all node pool tests).
|
The `TESTARGS` variable is regexp-like, so multiple tests can be run in parallel by specifying a common substring of those tests (for example, `TestAccContainerNodePool` to run all node pool tests).
|
||||||
|
|
||||||
To run all tests, you can simply omit the `TESTARGS` argument - but please keep in mind that that is quite a few tests and will take quite a long time and create some fairly expensive resources. It usually is not advisable to run all tests.
|
To run all tests, you can omit the `TESTARGS` argument - but please keep in mind that that is quite a few tests and will take quite a long time and create some fairly expensive resources. It usually is not advisable to run all tests.
|
||||||
|
|
||||||
### Writing Tests
|
### Writing Tests
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user