From 50faa88c7c3860d68203050e7da1212595035cbf Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Thu, 14 Oct 2021 16:31:44 +0200 Subject: [PATCH] Add back testing for tripleo-ansible modules. [0] enabled the execution of molecule tests to cover the tripleo-ansible added modules. However, the job was removed due to the movement to collections. As currently, none of the molecule tests under ansible_plugins/tests are being triggered by the CI any changes into the corresponding modules might break their functionality and pass unnoticed. This patch enables back the tripleo-ansible-centos-8-molecule-tripleo-modules test which will get triggered when some of the corresponding modules get modified. [0]: https://github.com/openstack/tripleo-ansible/commit/2d420827378d43d79def26fb254cd33b7a6e89b5 Change-Id: Id6f89dfa7075e59f17fe847e3d14024aaa287933 (cherry picked from commit dd2fc8a73b89f3fb796e89ed0dbd6fc3a33a1eb0) --- tox.ini | 7 +++++++ zuul.d/molecule.yaml | 12 ++++++++++++ 2 files changed, 19 insertions(+) diff --git a/tox.ini b/tox.ini index ba00660a5..88ab82235 100644 --- a/tox.ini +++ b/tox.ini @@ -108,3 +108,10 @@ commands = echo -e '\n\nNo molecule tests have been executed\nSee https://docs.openstack.org/tripleo-ansible/latest/contributing.html#local-testing-of-new-roles\n\n'; \ fi" {[testenv:linters]commands} + +[testenv:modules] +deps= + {[testenv:linters]deps} +commands = + bash -c "cd {toxinidir}/tripleo_ansible/ansible_plugins/tests; molecule test --all;" + {[testenv:linters]commands} diff --git a/zuul.d/molecule.yaml b/zuul.d/molecule.yaml index 127ffd56f..5c53cdcfb 100644 --- a/zuul.d/molecule.yaml +++ b/zuul.d/molecule.yaml @@ -64,6 +64,7 @@ - tripleo-ansible-centos-8-molecule-tripleo_validations_package - tripleo-ansible-centos-8-molecule-tuned - tripleo-ansible-centos-8-role-addition + - tripleo-ansible-centos-8-molecule-tripleo-modules gate: jobs: - tripleo-ansible-centos-8-molecule-aide @@ -126,6 +127,7 @@ - tripleo-ansible-centos-8-molecule-tripleo_validations_package - tripleo-ansible-centos-8-molecule-tuned - tripleo-ansible-centos-8-role-addition + - tripleo-ansible-centos-8-molecule-tripleo-modules name: tripleo-ansible-molecule-jobs periodic-weekly: jobs: @@ -633,3 +635,13 @@ voting: false vars: tox_envlist: role-addition +- job: + files: + - ^tripleo_ansible/ansible_plugins/modules/container_startup_config.py + - ^tripleo_ansible/ansible_plugins/modules/tripleo_container_configs.py + - ^tripleo_ansible/ansible_plugins/modules/tripleo_container_config_scripts.py + - ^tripleo_ansible/ansible_plugins/modules/tripleo_os_net_config.py + - ^tripleo_ansible/ansible_plugins/strategy/.* + - ^tox.ini + name: tripleo-ansible-centos-8-molecule-tripleo-modules + parent: tripleo-ansible-centos-8-base