feat: add support for using application default credentials when running integration tests

This commit is contained in:
Chris Hawk 2023-11-09 16:34:51 -08:00
commit bf74697b3f
90 changed files with 856 additions and 793 deletions

View file

@ -27,7 +27,7 @@
- MODE_IPV4
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
#----------------------------------------------------------
- name: create a instance
@ -44,7 +44,7 @@
- MODE_IPV4
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: result
- name: assert changed is true
@ -56,7 +56,7 @@
zone: us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/cloud-platform
register: results
@ -79,7 +79,7 @@
- MODE_IPV4
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: result
- name: assert changed is false
@ -101,7 +101,7 @@
- MODE_IPV4
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: result
- name: assert changed is true
@ -113,7 +113,7 @@
zone: us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/cloud-platform
register: results
@ -136,7 +136,7 @@
- MODE_IPV4
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: result
- name: assert changed is false