Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Ansible integration test fixes - pt 2 (#147)
Browse files Browse the repository at this point in the history
<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
  • Loading branch information
modular-magician authored and rambleraptor committed Dec 14, 2018
1 parent 659fbbb commit 7d0eb7b
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 33 deletions.
4 changes: 2 additions & 2 deletions lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@
state: present
register: gateway
- name: create a vpn-tunnel
gcp_compute_vpn-tunnel:
- name: create a vpn tunnel
gcp_compute_vpn_tunnel:
name: "test_object"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
Expand Down
4 changes: 3 additions & 1 deletion lib/ansible/modules/cloud/google/gcp_iam_service_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
EXAMPLES = '''
- name: create a service account
gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"
'
display_name: My Ansible test key
project: "test_project"
auth_kind: "serviceaccount"
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_sql_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
EXAMPLES = '''
- name: create a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-3"
settings:
ip_configuration:
authorized_networks:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_sql_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
EXAMPLES = '''
- name: create a instance
gcp_sql_instance:
name: "test_object"
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/cloud/google/gcp_sql_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
EXAMPLES = '''
- name: create a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-1"
settings:
ip_configuration:
authorized_networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
EXAMPLES = '''
- name: create a bucket
gcp_storage_bucket:
name: "bucket-bac"
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
Expand Down
20 changes: 10 additions & 10 deletions test/integration/targets/gcp_compute_vpn_tunnel/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
service_account_file: "{{ gcp_cred_file }}"
state: present
register: gateway
- name: delete a vpn-tunnel
gcp_compute_vpn-tunnel:
- name: delete a vpn tunnel
gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
Expand All @@ -61,8 +61,8 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
#----------------------------------------------------------
- name: create a vpn-tunnel
gcp_compute_vpn-tunnel:
- name: create a vpn tunnel
gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
Expand Down Expand Up @@ -94,8 +94,8 @@
that:
- results['items'] | length == 1
# ----------------------------------------------------------------------------
- name: create a vpn-tunnel that already exists
gcp_compute_vpn-tunnel:
- name: create a vpn tunnel that already exists
gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
Expand All @@ -112,8 +112,8 @@
- result.changed == false
- "result.kind == 'compute#vpnTunnel'"
#----------------------------------------------------------
- name: delete a vpn-tunnel
gcp_compute_vpn-tunnel:
- name: delete a vpn tunnel
gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
Expand Down Expand Up @@ -145,8 +145,8 @@
that:
- results['items'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a vpn-tunnel that does not exist
gcp_compute_vpn-tunnel:
- name: delete a vpn tunnel that does not exist
gcp_compute_vpn_tunnel:
name: "{{ resource_name }}"
region: us-west1
target_vpn_gateway: "{{ gateway }}"
Expand Down
20 changes: 15 additions & 5 deletions test/integration/targets/gcp_iam_service_account/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# Pre-test setup
- name: delete a service account
gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"
'
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
Expand All @@ -24,7 +26,9 @@
#----------------------------------------------------------
- name: create a service account
gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"
'
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
Expand All @@ -50,7 +54,9 @@
# ----------------------------------------------------------------------------
- name: create a service account that already exists
gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"
'
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
Expand All @@ -64,7 +70,9 @@
#----------------------------------------------------------
- name: delete a service account
gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"
'
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
Expand All @@ -90,7 +98,9 @@
# ----------------------------------------------------------------------------
- name: delete a service account that does not exist
gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"
'
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
Expand Down
4 changes: 2 additions & 2 deletions test/integration/targets/gcp_sql_database/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Pre-test setup
- name: create a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-3"
settings:
ip_configuration:
authorized_networks:
Expand Down Expand Up @@ -132,7 +132,7 @@
# If errors happen, don't crash the playbook!
- name: delete a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-3"
settings:
ip_configuration:
authorized_networks:
Expand Down
10 changes: 5 additions & 5 deletions test/integration/targets/gcp_sql_instance/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Pre-test setup
- name: delete a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
Expand All @@ -30,7 +30,7 @@
#----------------------------------------------------------
- name: create a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
Expand Down Expand Up @@ -63,7 +63,7 @@
# ----------------------------------------------------------------------------
- name: create a instance that already exists
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
Expand All @@ -84,7 +84,7 @@
#----------------------------------------------------------
- name: delete a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
Expand Down Expand Up @@ -117,7 +117,7 @@
# ----------------------------------------------------------------------------
- name: delete a instance that does not exist
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
Expand Down
4 changes: 2 additions & 2 deletions test/integration/targets/gcp_sql_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Pre-test setup
- name: create a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-1"
settings:
ip_configuration:
authorized_networks:
Expand Down Expand Up @@ -137,7 +137,7 @@
# If errors happen, don't crash the playbook!
- name: delete a instance
gcp_sql_instance:
name: "{{ resource_name }}"
name: "{{resource_name}}-1"
settings:
ip_configuration:
authorized_networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Pre-test setup
- name: create a bucket
gcp_storage_bucket:
name: "bucket-bac"
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
Expand Down Expand Up @@ -99,7 +99,7 @@
# If errors happen, don't crash the playbook!
- name: delete a bucket
gcp_storage_bucket:
name: "bucket-bac"
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
Expand Down

0 comments on commit 7d0eb7b

Please sign in to comment.