From 43061bdd448985885da62785b326efc3769a21d2 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Mon, 14 Sep 2020 10:24:14 -0400 Subject: [PATCH] zuul: bump fedora nodesets from f31 to f32 Change-Id: I75ae58a026c3aacdeaedbb3dd9fb96a7a377f763 --- .zuul.d/jobs.yaml | 16 ++++++------ .zuul.d/nodesets.yaml | 25 +++++++++++++------ tests/basic.yaml | 8 ++++++ .../roles/smoke-tests/defaults/main.yaml | 8 ------ .../roles/smoke-tests/tasks/ara-ops.yaml | 25 ++++++------------- .../roles/smoke-tests/tasks/test-ops.yaml | 5 ---- 6 files changed, 42 insertions(+), 45 deletions(-) diff --git a/.zuul.d/jobs.yaml b/.zuul.d/jobs.yaml index a8089b9c..a00c4031 100644 --- a/.zuul.d/jobs.yaml +++ b/.zuul.d/jobs.yaml @@ -58,7 +58,7 @@ parent: ara-api-database-backends nodeset: ara-database-server-multinode description: | - Deploys the ARA API server on Ubuntu 18.04, Fedora 31 as well as CentOS 8 + Deploys the ARA API server on Ubuntu 18.04, Fedora 32 as well as CentOS 8 and tests it against a central PostgreSQL server installed on CentOS 8. The job exercises the ara_api Ansible role, the ARA Ansible plugins, the ARA API clients as well as the API itself. @@ -70,7 +70,7 @@ parent: ara-api-database-backends nodeset: ara-database-server-multinode description: | - Deploys the ARA API server on Ubuntu 18.04, Fedora 31 as well as CentOS 8 + Deploys the ARA API server on Ubuntu 18.04, Fedora 32 as well as CentOS 8 and tests it against a central MySQL server installed on CentOS 8. The job exercises the ara_api Ansible role, the ARA Ansible plugins, the ARA API clients as well as the API itself. @@ -82,7 +82,7 @@ parent: ara-api-database-backends nodeset: ara-multinode description: | - Deploys the ARA API server on Ubuntu 18.04, Fedora 31 as well as CentOS 8 + Deploys the ARA API server on Ubuntu 18.04, Fedora 32 as well as CentOS 8 and tests it using the distributed sqlite database backend. run: tests/with_distributed_sqlite.yaml @@ -91,16 +91,16 @@ - job: name: ara-api-fedora-packages parent: ara-integration-base - nodeset: ara-fedora-31 + nodeset: ara-fedora-32 description: | - Deploys the ARA API server on Fedora 31 using distribution packages for + Deploys the ARA API server on Fedora 32 using distribution packages for ARA and Ansible. run: tests/with_fedora_packages.yaml - job: name: ara-ansible-integration-base parent: ara-integration-base - nodeset: ara-fedora-31 + nodeset: ara-fedora-32 vars: ara_api_source: "{{ ansible_user_dir }}/src/opendev.org/recordsansible/ara" run: tests/basic.yaml @@ -155,7 +155,7 @@ - job: name: ara-container-images parent: ara-integration-base - nodeset: ara-fedora-31 + nodeset: ara-fedora-32 description: | Builds ARA API container images with buildah and briefly tests them with podman. run: tests/with_container_images.yaml @@ -163,7 +163,7 @@ - job: name: ara-container-images-dockerhub parent: ara-integration-base - nodeset: ara-fedora-31 + nodeset: ara-fedora-32 description: | Builds ARA API container images with buildah and briefly tests them with podman. The resulting images are pushed to dockerhub if successful. diff --git a/.zuul.d/nodesets.yaml b/.zuul.d/nodesets.yaml index cd320335..a148bc3d 100644 --- a/.zuul.d/nodesets.yaml +++ b/.zuul.d/nodesets.yaml @@ -7,8 +7,8 @@ label: centos-8 - name: ubuntu-bionic label: ubuntu-bionic - - name: fedora-31 - label: fedora-31 + - name: fedora-32 + label: fedora-32 - name: centos-8 label: centos-8 groups: @@ -18,7 +18,7 @@ - name: ara-api-server nodes: - ubuntu-bionic - - fedora-31 + - fedora-32 - centos-8 # Nodeset used to test instances of ARA API deployed on different operating @@ -28,17 +28,28 @@ nodes: - name: ubuntu-bionic label: ubuntu-bionic - - name: fedora-31 - label: fedora-31 + - name: fedora-32 + label: fedora-32 - name: centos-8 label: centos-8 groups: - name: ara-api-server nodes: - ubuntu-bionic - - fedora-31 + - fedora-32 - centos-8 +- nodeset: + name: ara-fedora-32 + nodes: + - name: fedora-32 + label: fedora-32 + groups: + - name: ara-api-server + nodes: + - fedora-32 + +# TODO: Remove ara-fedora-31 after bumping ara-collection as well - nodeset: name: ara-fedora-31 nodes: @@ -47,4 +58,4 @@ groups: - name: ara-api-server nodes: - - fedora-31 + - fedora-31 \ No newline at end of file diff --git a/tests/basic.yaml b/tests/basic.yaml index 810de7d3..e5daa368 100644 --- a/tests/basic.yaml +++ b/tests/basic.yaml @@ -79,6 +79,11 @@ virtualenv: "{{ ara_api_venv_path }}" virtualenv_command: /usr/bin/python3 -m venv + - name: Get effective version of Ansible installed + shell: "{{ ara_api_venv_path }}/bin/ansible --version | head -n1 | awk '{print $2}'" + changed_when: false + register: _installed_ansible_version + - name: Install ARA from source in virtual environment pip: name: "{{ ara_api_source }}[server]" @@ -150,6 +155,9 @@ - name: Run lookup integration tests command: "ansible-playbook -vvv {{ _test_root }}/lookups.yaml" + # TODO: ansible.utils.unsafe_proxy.AnsibleUnsafeText errors on 2.7 + when: + - _installed_ansible_version.stdout is version('2.8', '>=') - name: Run hosts.yaml integration test command: "ansible-playbook -vvv {{ _test_root }}/hosts.yaml" diff --git a/tests/integration/roles/smoke-tests/defaults/main.yaml b/tests/integration/roles/smoke-tests/defaults/main.yaml index 51ff67fd..4dea2f50 100644 --- a/tests/integration/roles/smoke-tests/defaults/main.yaml +++ b/tests/integration/roles/smoke-tests/defaults/main.yaml @@ -19,11 +19,3 @@ list_items: - one - two - -dict_items: - one: - name: "key-one" - value: "value-one" - two: - name: "key-two" - value: "value-two" diff --git a/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml b/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml index 23723b41..bf92bdd0 100644 --- a/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml +++ b/tests/integration/roles/smoke-tests/tasks/ara-ops.yaml @@ -103,16 +103,13 @@ register: somelist - name: Validate somelist key - vars: - someitems: - - one - - two - - three - - go assert: that: - somelist.key == "somelist" - - somelist.value == someitems + - "'one' in somelist.value" + - "'two' in somelist.value" + - "'three' in somelist.value" + - "'go' in somelist.value" - somelist.type == "list" - name: Record a dict value @@ -127,14 +124,11 @@ register: somedict - name: Validate somedict key - vars: - dictdata: - foo: "bar" - bar: "foo" assert: that: - somedict.key == "somedict" - - somedict.value == dictdata + - "'bar' in somedict.value" + - "'foo' in somedict.value" - somedict.type == "dict" - name: Record a list as a text type @@ -151,14 +145,11 @@ # The key is still recorded as an actual list, however, it will be rendered # as text in the UI. - name: Validate list_as_text key - vars: - list: - - foo - - bar assert: that: - list_as_text.key == "list_as_text" - - list_as_text.value == list + - "'foo' in list_as_text.value" + - "'bar' in list_as_text.value" - list_as_text.value != "[u'foo', u'bar']" - list_as_text.type == "text" diff --git a/tests/integration/roles/smoke-tests/tasks/test-ops.yaml b/tests/integration/roles/smoke-tests/tasks/test-ops.yaml index 3c300dce..0f9c75ec 100644 --- a/tests/integration/roles/smoke-tests/tasks/test-ops.yaml +++ b/tests/integration/roles/smoke-tests/tasks/test-ops.yaml @@ -46,11 +46,6 @@ msg: "{{ item }}" with_items: "{{ list_items }}" -- name: Test with_dict - debug: - msg: "{{ item.value.name }}: {{ item.value.value }}" - with_dict: "{{ dict_items }}" - - name: Test for XSS command: echo "" changed_when: False