ci: fix various issues preventing complete runs
When creating a coe cluster, a flavor lookup occurs which fails as nothing is specified. This adds a default flavor which can be used to test cluster provisioning. Various checks used a deprecated truthy check which no longer works with Ansible 2.19 Inventory cache format change in Ansible 2.19 galaxy.yml required in tmp testing directory or version checks fail for linters with Ansible 2.19 Change-Id: Iaf3f05d0841a541e4318821fe44ddd59f236b640
This commit is contained in:
@@ -72,6 +72,8 @@
|
||||
image_id: '{{ image_id }}'
|
||||
is_floating_ip_enabled: true
|
||||
keypair_id: '{{ keypair.keypair.id }}'
|
||||
flavor_id: 'm1.small'
|
||||
master_flavor_id: 'm1.small'
|
||||
name: k8s
|
||||
state: present
|
||||
register: coe_cluster_template
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
that:
|
||||
- server1_fips is success
|
||||
- server1_fips is not changed
|
||||
- server1_fips.floating_ips
|
||||
- server1_fips.floating_ips|length > 0
|
||||
# allow new fields to be introduced but prevent fields from being removed
|
||||
- expected_fields|difference(server1_fips.floating_ips[0].keys())|length == 0
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
- name: Assert return values of floating_ip module
|
||||
assert:
|
||||
that:
|
||||
- floating_ip.floating_ip
|
||||
- floating_ip.floating_ip|length > 0
|
||||
# allow new fields to be introduced but prevent fields from being removed
|
||||
- expected_fields|difference(floating_ip.floating_ip.keys())|length == 0
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
- name: Assert floating ip attached to server 2
|
||||
assert:
|
||||
that:
|
||||
- server2_fip.floating_ip
|
||||
- server2_fip.floating_ip|length > 0
|
||||
|
||||
- name: Find all floating ips for debugging
|
||||
openstack.cloud.floating_ip_info:
|
||||
|
||||
@@ -279,6 +279,11 @@
|
||||
ansible.builtin.set_fact:
|
||||
cache: "{{ cache.content | b64decode | from_yaml }}"
|
||||
|
||||
- name: Further process Ansible 2.19+ cache
|
||||
ansible.builtin.set_fact:
|
||||
cache: "{{ cache.__payload__ | from_yaml }}"
|
||||
when: cache.__payload__ is defined
|
||||
|
||||
- name: Check Ansible's cache
|
||||
assert:
|
||||
that:
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
- name: Ensure public key is returned
|
||||
assert:
|
||||
that:
|
||||
- keypair.keypair.public_key is defined and keypair.keypair.public_key
|
||||
- keypair.keypair.public_key is defined and keypair.keypair.public_key|length > 0
|
||||
|
||||
- name: Create another keypair
|
||||
openstack.cloud.keypair:
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
- name: Check output of creating network
|
||||
assert:
|
||||
that:
|
||||
- infonet.network
|
||||
- infonet.network is defined
|
||||
- item in infonet.network
|
||||
loop: "{{ expected_fields }}"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ echo "Running test with Python version ${PY_VER}"
|
||||
|
||||
rm -rf "${ANSIBLE_COLLECTIONS_PATH}"
|
||||
mkdir -p ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
|
||||
cp -a ${TOXDIR}/{plugins,meta,tests,docs} ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
|
||||
cp -a ${TOXDIR}/{plugins,meta,tests,docs,galaxy.yml} ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud
|
||||
cd ${ANSIBLE_COLLECTIONS_PATH}/ansible_collections/openstack/cloud/
|
||||
echo "Running ansible-test with version:"
|
||||
ansible --version
|
||||
|
||||
Reference in New Issue
Block a user