mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-08-24 23:11:51 -07:00
Add test instructions and fix region disk test (#500)
As a step toward adding integration testing into the CI process for this project, adding instructions on how to run the tests. compute_region_disk was used as a test. Fixed the tests which was previously hard-coded to the `graphite-playground` GCP project to work with the project in the user-configure .ini file.
This commit is contained in:
parent
f6d42b4bc1
commit
c025cea939
4 changed files with 54 additions and 12 deletions
38
CONTRIBUTING.md
Normal file
38
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Contributing to the google.cloud collection
|
||||
|
||||
## Cloning
|
||||
|
||||
The `ansible-test` command expects that the repository is in a directory that matches it's collection,
|
||||
under a directory `ansible_collections`. Clone ensuring that hierarchy:
|
||||
|
||||
```shell
|
||||
mkdir -p $TARGET_DIR/ansible_collections/google
|
||||
git clone <url> $TARGET_DIR/collections/google/cloud
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
### prequisites for all tests
|
||||
|
||||
- Install the `ansible` package.
|
||||
|
||||
## Running integration tests
|
||||
|
||||
### Integration testing prequisites
|
||||
|
||||
#### Installing personal GCP credentials
|
||||
|
||||
The integration tests for this module require the use of real GCP credentials, and must provide
|
||||
ansible-test those values. They can be added by authoring the following in `tests/integration/cloud-config-gcp.ini`:
|
||||
|
||||
```
|
||||
[default]
|
||||
gcp_project: @PROJECT_ID
|
||||
gcp_cred_file: @CRED_FILE
|
||||
gcp_cred_kind: @CRED_KIND
|
||||
gcp_cred_email: @EMAIL
|
||||
```
|
||||
|
||||
### Running
|
||||
|
||||
Run `ansible-test integration`. Currently some tests are disabled as [test are being verified and added](https://github.com/ansible-collections/google.cloud/issues/499).
|
Loading…
Add table
Add a link
Reference in a new issue