tests: fix gcp_compute_region_url_map

- remove the global health check (not necessary to create a backend
  service)
- configure backend service to external, as internal backend services
  cannot use the HTTP protocol.
This commit is contained in:
Yusuke Tsutsumi 2022-10-08 18:40:05 +00:00
parent c962945615
commit 7fb64edcc5
2 changed files with 4 additions and 34 deletions

View file

@ -1,2 +1 @@
cloud/gcp
unsupported
cloud/gcp

View file

@ -13,29 +13,15 @@
#
# ----------------------------------------------------------------------------
# Pre-test setup
- name: create a health check
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: HTTP
http_health_check:
port: 80
check_interval_sec: 1
timeout_sec: 1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a region backend service
google.cloud.gcp_compute_region_backend_service:
name: "{{ resource_name }}"
region: us-central1
health_checks:
- "{{ healthcheck.selfLink }}"
protocol: HTTP
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
load_balancing_scheme: "EXTERNAL"
state: present
register: backendservice
- name: delete a region URL map
@ -144,26 +130,11 @@
google.cloud.gcp_compute_region_backend_service:
name: "{{ resource_name }}"
region: us-central1
health_checks:
- "{{ healthcheck.selfLink }}"
protocol: HTTP
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
load_balancing_scheme: "EXTERNAL"
state: absent
register: backendservice
ignore_errors: true
- name: delete a health check
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: HTTP
http_health_check:
port: 80
check_interval_sec: 1
timeout_sec: 1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: healthcheck
ignore_errors: true
ignore_errors: true