fix: upgrade ansible version, address test and lint errors

This commit is contained in:
Chris Hawk 2023-11-17 16:39:42 -08:00
commit 08ada5354d
216 changed files with 4394 additions and 4262 deletions

View file

@ -13,7 +13,7 @@
#
# ----------------------------------------------------------------------------
# Pre-test setup
- name: delete a config
- name: Delete a config
google.cloud.gcp_runtimeconfig_config:
name: "{{ resource_name }}"
description: My config
@ -22,7 +22,7 @@
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
#----------------------------------------------------------
- name: create a config
- name: Create a config
google.cloud.gcp_runtimeconfig_config:
name: "{{ resource_name }}"
description: My config
@ -31,24 +31,24 @@
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: result
- name: assert changed is true
assert:
- name: Assert changed is true
ansible.builtin.assert:
that:
- result.changed == true
- name: verify that config was created
- name: Verify that config was created
google.cloud.gcp_runtimeconfig_config_info:
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/cloudruntimeconfig
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/cloudruntimeconfig
register: results
- name: verify that command succeeded
assert:
- name: Verify that command succeeded
ansible.builtin.assert:
that:
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 1
# ----------------------------------------------------------------------------
- name: create a config that already exists
- name: Create a config that already exists
google.cloud.gcp_runtimeconfig_config:
name: "{{ resource_name }}"
description: My config
@ -57,12 +57,12 @@
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: present
register: result
- name: assert changed is false
assert:
- name: Assert changed is false
ansible.builtin.assert:
that:
- result.changed == false
#----------------------------------------------------------
- name: delete a config
- name: Delete a config
google.cloud.gcp_runtimeconfig_config:
name: "{{ resource_name }}"
description: My config
@ -71,24 +71,24 @@
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: result
- name: assert changed is true
assert:
- name: Assert changed is true
ansible.builtin.assert:
that:
- result.changed == true
- name: verify that config was deleted
- name: Verify that config was deleted
google.cloud.gcp_runtimeconfig_config_info:
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/cloudruntimeconfig
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file | default(omit) }}"
scopes:
- https://www.googleapis.com/auth/cloudruntimeconfig
register: results
- name: verify that command succeeded
assert:
- name: Verify that command succeeded
ansible.builtin.assert:
that:
- results['resources'] | map(attribute='name') | select("match", ".*{{ resource_name }}.*") | list | length == 0
# ----------------------------------------------------------------------------
- name: delete a config that does not exist
- name: Delete a config that does not exist
google.cloud.gcp_runtimeconfig_config:
name: "{{ resource_name }}"
description: My config
@ -97,7 +97,7 @@
service_account_file: "{{ gcp_cred_file | default(omit) }}"
state: absent
register: result
- name: assert changed is false
assert:
- name: Assert changed is false
ansible.builtin.assert:
that:
- result.changed == false

View file

@ -1,2 +1,3 @@
---
- include_tasks: autogen.yml
- name: Generated tests
ansible.builtin.include_tasks: autogen.yml