Adding namespace on integration tests + examples

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
Alex Stephen 2019-09-30 22:08:25 +00:00 committed by Modular Magician
commit 516fada880
130 changed files with 570 additions and 570 deletions

View file

@ -14,7 +14,7 @@
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: globaladdress-globalforwardingrule
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -22,7 +22,7 @@
state: present
register: globaladdress
- name: create a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-globalforwardingrule
zone: us-central1-a
project: "{{ gcp_project }}"
@ -31,7 +31,7 @@
state: present
register: instancegroup
- name: create a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-globalforwardingrule
healthy_threshold: 10
port: 8080
@ -43,7 +43,7 @@
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-globalforwardingrule
backends:
- group: "{{ instancegroup.selfLink }}"
@ -56,7 +56,7 @@
state: present
register: backendservice
- name: create a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-globalforwardingrule
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -65,7 +65,7 @@
state: present
register: urlmap
- name: create a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: targethttpproxy-globalforwardingrule
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -74,7 +74,7 @@
state: present
register: httpproxy
- name: delete a global forwarding rule
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -86,7 +86,7 @@
state: absent
#----------------------------------------------------------
- name: create a global forwarding rule
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -117,7 +117,7 @@
- results['resources'] | length == 1
# ----------------------------------------------------------------------------
- name: create a global forwarding rule that already exists
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -134,7 +134,7 @@
- result.changed == false
#----------------------------------------------------------
- name: delete a global forwarding rule
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -165,7 +165,7 @@
- results['resources'] | length == 0
# ----------------------------------------------------------------------------
- name: delete a global forwarding rule that does not exist
gcp_compute_global_forwarding_rule:
google.cloud.gcp_compute_global_forwarding_rule:
name: "{{ resource_name }}"
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
@ -184,7 +184,7 @@
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a target HTTP proxy
gcp_compute_target_http_proxy:
google.cloud.gcp_compute_target_http_proxy:
name: targethttpproxy-globalforwardingrule
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
@ -194,7 +194,7 @@
register: httpproxy
ignore_errors: true
- name: delete a URL map
gcp_compute_url_map:
google.cloud.gcp_compute_url_map:
name: urlmap-globalforwardingrule
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
@ -204,7 +204,7 @@
register: urlmap
ignore_errors: true
- name: delete a backend service
gcp_compute_backend_service:
google.cloud.gcp_compute_backend_service:
name: backendservice-globalforwardingrule
backends:
- group: "{{ instancegroup.selfLink }}"
@ -218,7 +218,7 @@
register: backendservice
ignore_errors: true
- name: delete a HTTP health check
gcp_compute_http_health_check:
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-globalforwardingrule
healthy_threshold: 10
port: 8080
@ -231,7 +231,7 @@
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
google.cloud.gcp_compute_instance_group:
name: instancegroup-globalforwardingrule
zone: us-central1-a
project: "{{ gcp_project }}"
@ -241,7 +241,7 @@
register: instancegroup
ignore_errors: true
- name: delete a global address
gcp_compute_global_address:
google.cloud.gcp_compute_global_address:
name: globaladdress-globalforwardingrule
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"