mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-05 18:30:27 -07:00
removing interconnect tests
This commit is contained in:
parent
6f218887e2
commit
5673c2b7a9
1 changed files with 0 additions and 116 deletions
|
@ -1,116 +0,0 @@
|
|||
---
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
|
||||
#
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# This file is automatically generated by Magic Modules and manual
|
||||
# changes will be clobbered when the file is regenerated.
|
||||
#
|
||||
# Please read more about how to change this file at
|
||||
# https://www.github.com/GoogleCloudPlatform/magic-modules
|
||||
#
|
||||
# ----------------------------------------------------------------------------
|
||||
# Pre-test setup
|
||||
- name: delete a interconnect attachment
|
||||
gcp_compute_interconnect_attachment:
|
||||
name: "{{ resource_name }}"
|
||||
region: us-central1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
interconnect: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/global/interconnects/...
|
||||
router: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/regions/us-central1/routers/...
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: absent
|
||||
register: disk
|
||||
#----------------------------------------------------------
|
||||
- name: create a interconnect attachment
|
||||
gcp_compute_interconnect_attachment:
|
||||
name: "{{ resource_name }}"
|
||||
region: us-central1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
interconnect: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/global/interconnects/...
|
||||
router: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/regions/us-central1/routers/...
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: present
|
||||
register: disk
|
||||
register: result
|
||||
- name: assert changed is true
|
||||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- "result.kind == 'compute#interconnectAttachment'"
|
||||
- name: verify that interconnect_attachment was created
|
||||
shell: |
|
||||
gcloud compute interconnects attachments describe "{{ resource_name }}" --project="{{ gcp_project}}" --region="{{ gcp_region}}"
|
||||
register: results
|
||||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results.rc == 0
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: create a interconnect attachment that already exists
|
||||
gcp_compute_interconnect_attachment:
|
||||
name: "{{ resource_name }}"
|
||||
region: us-central1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
interconnect: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/global/interconnects/...
|
||||
router: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/regions/us-central1/routers/...
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: present
|
||||
register: disk
|
||||
register: result
|
||||
- name: assert changed is false
|
||||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- "result.kind == 'compute#interconnectAttachment'"
|
||||
#----------------------------------------------------------
|
||||
- name: delete a interconnect attachment
|
||||
gcp_compute_interconnect_attachment:
|
||||
name: "{{ resource_name }}"
|
||||
region: us-central1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
interconnect: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/global/interconnects/...
|
||||
router: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/regions/us-central1/routers/...
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: absent
|
||||
register: disk
|
||||
register: result
|
||||
- name: assert changed is true
|
||||
assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
- result.has_key('kind') == False
|
||||
- name: verify that interconnect_attachment was deleted
|
||||
shell: |
|
||||
gcloud compute interconnects attachments describe "{{ resource_name }}" --project="{{ gcp_project}}" --region="{{ gcp_region}}"
|
||||
register: results
|
||||
failed_when: results.rc == 0
|
||||
- name: verify that command succeeded
|
||||
assert:
|
||||
that:
|
||||
- results.rc == 1
|
||||
- "\"'projects/{{ gcp_project }}/global/images/{{ resource_name }}' was not found\" in results.stderr"
|
||||
# ----------------------------------------------------------------------------
|
||||
- name: delete a interconnect attachment that does not exist
|
||||
gcp_compute_interconnect_attachment:
|
||||
name: "{{ resource_name }}"
|
||||
region: us-central1
|
||||
project: "{{ gcp_project }}"
|
||||
auth_kind: "{{ gcp_cred_kind }}"
|
||||
interconnect: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/global/interconnects/...
|
||||
router: https://googleapis.com/compute/v1/projects/{{ gcp_project }}/regions/us-central1/routers/...
|
||||
service_account_file: "{{ gcp_cred_file }}"
|
||||
state: absent
|
||||
register: disk
|
||||
register: result
|
||||
- name: assert changed is false
|
||||
assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
- result.has_key('kind') == False
|
Loading…
Add table
Reference in a new issue