Rework gcp_compute_instance integration tests

Also adding the test cases for new attachDisk feature
This commit is contained in:
Jorge Gallegos 2025-09-10 11:28:16 -07:00
commit a65d6ebfa5
No known key found for this signature in database
3 changed files with 120 additions and 8 deletions

View file

@ -2,7 +2,7 @@
- name: Generated tests
ansible.builtin.include_tasks: autogen.yml
- name: Test nic_type scenarios
- name: Extra non-autogen tests
block:
- name: Create network
google.cloud.gcp_compute_network:
@ -14,15 +14,23 @@
state: present
register: _network
- name: Loop over testcase
- name: Test GVNIC test cases
ansible.builtin.include_tasks: gvnic.yml
loop: "{{ testcases | dict2items }}"
vars:
gcp_disk_image: projects/centos-cloud/global/images/family/centos-stream-9
gcp_zone: us-central1-a
testcases:
gvnic: GVNIC
virtio: VIRTIO_NET
default: default
- name: Test attach disks
ansible.builtin.include_tasks: attach-disks.yml
vars:
gcp_disk_image: projects/centos-cloud/global/images/family/centos-stream-9
gcp_zone: us-central1-a
always:
- name: Delete network
google.cloud.gcp_compute_network: