mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-06 10:50:28 -07:00
tests: cleaning up resourcemanager, enabling spanner
- gcp_spanner_instance works, enabling for CI. - gcp_resourcemanager_project is running into quota issues for listing the API to verify state. Adding a to-do as well as removing some people-specific names.
This commit is contained in:
parent
1a753eff05
commit
cfbc4d8be5
6 changed files with 14 additions and 9 deletions
|
@ -134,7 +134,7 @@ EXAMPLES = '''
|
||||||
- name: create a project
|
- name: create a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: serviceaccount
|
auth_kind: serviceaccount
|
||||||
service_account_file: "/tmp/auth.pem"
|
service_account_file: "/tmp/auth.pem"
|
||||||
parent:
|
parent:
|
||||||
|
|
|
@ -33,6 +33,7 @@ SERVICE_LIST=(
|
||||||
REQUIRED_ROLE_LIST=(
|
REQUIRED_ROLE_LIST=(
|
||||||
"roles/storage.objectAdmin"
|
"roles/storage.objectAdmin"
|
||||||
"roles/source.admin"
|
"roles/source.admin"
|
||||||
|
"roles/resourcemanager.projects.create"
|
||||||
)
|
)
|
||||||
|
|
||||||
for SERVICE in "${SERVICE_LIST[@]}"; do
|
for SERVICE in "${SERVICE_LIST[@]}"; do
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
unsupported
|
|
@ -16,7 +16,7 @@
|
||||||
- name: delete a project
|
- name: delete a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
- name: create a project
|
- name: create a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
- name: create a project that already exists
|
- name: create a project that already exists
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
- name: delete a project
|
- name: delete a project
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
- name: delete a project that does not exist
|
- name: delete a project that does not exist
|
||||||
google.cloud.gcp_resourcemanager_project:
|
google.cloud.gcp_resourcemanager_project:
|
||||||
name: My Sample Project
|
name: My Sample Project
|
||||||
id: alextest-{{ 10000000000 | random }}
|
id: ansible-test-{{ 10000000000 | random }}
|
||||||
auth_kind: "{{ gcp_cred_kind }}"
|
auth_kind: "{{ gcp_cred_kind }}"
|
||||||
service_account_file: "{{ gcp_cred_file }}"
|
service_account_file: "{{ gcp_cred_file }}"
|
||||||
parent:
|
parent:
|
||||||
|
|
|
@ -71,6 +71,11 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- result.changed == true
|
- result.changed == true
|
||||||
|
# TODO(@toumorokoshi): investigate if the pause helps
|
||||||
|
# prevent quota issues.
|
||||||
|
# - name: Pause for 1 minute to keep from hitting quota limit
|
||||||
|
# ansible.builtin.pause:
|
||||||
|
# minutes: 1
|
||||||
- name: verify that service was deleted
|
- name: verify that service was deleted
|
||||||
google.cloud.gcp_serviceusage_service_info:
|
google.cloud.gcp_serviceusage_service_info:
|
||||||
project: "{{ gcp_project }}"
|
project: "{{ gcp_project }}"
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
cloud/gcp
|
cloud/gcp
|
||||||
unsupported
|
|
Loading…
Add table
Reference in a new issue