From 424004c4c046e993ccb288e217f2f5fa7e36f35a Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 2 Aug 2021 16:26:10 +0530 Subject: [PATCH] Enable firewalld tests Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/firewalld_test.yml | 3 +++ tests/integration/targets/firewalld/aliases | 3 +-- .../targets/firewalld/tasks/main.yml | 1 + .../targets/firewalld/tasks/run_all_tests.yml | 4 +--- .../targets/setup_pkg_mgr/tasks/main.yml | 17 +++++++++++++++++ 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/firewalld_test.yml create mode 100644 tests/integration/targets/setup_pkg_mgr/tasks/main.yml diff --git a/changelogs/fragments/firewalld_test.yml b/changelogs/fragments/firewalld_test.yml new file mode 100644 index 0000000000..4ed6020f07 --- /dev/null +++ b/changelogs/fragments/firewalld_test.yml @@ -0,0 +1,3 @@ +--- +bugfixes: +- firewalld - enable integration after migration (https://github.com/ansible-collections/ansible.posix/pull/239). diff --git a/tests/integration/targets/firewalld/aliases b/tests/integration/targets/firewalld/aliases index 96ae90e272..95259df37d 100644 --- a/tests/integration/targets/firewalld/aliases +++ b/tests/integration/targets/firewalld/aliases @@ -1,6 +1,5 @@ destructive -shippable/posix/group3 +shippable/posix/group1 skip/aix skip/freebsd skip/osx -disabled # fixme diff --git a/tests/integration/targets/firewalld/tasks/main.yml b/tests/integration/targets/firewalld/tasks/main.yml index 4e83ee8ea3..cb4910478a 100644 --- a/tests/integration/targets/firewalld/tasks/main.yml +++ b/tests/integration/targets/firewalld/tasks/main.yml @@ -40,3 +40,4 @@ - not (ansible_distribution == "Ubuntu" and ansible_distribution_version is version('14.04', '==')) # Firewalld package on OpenSUSE (15+) require Python 3, so we skip on OpenSUSE running py2 on these newer distros - not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and ansible_python.version.major != 3) + - not (ansible_facts.distribution == "CentOS" and ansible_distribution_major_version is version('7', '==')) # FIXME diff --git a/tests/integration/targets/firewalld/tasks/run_all_tests.yml b/tests/integration/targets/firewalld/tasks/run_all_tests.yml index f46deb62bd..29d253d776 100644 --- a/tests/integration/targets/firewalld/tasks/run_all_tests.yml +++ b/tests/integration/targets/firewalld/tasks/run_all_tests.yml @@ -9,8 +9,6 @@ # firewalld service operation test cases - include_tasks: service_test_cases.yml - # Skipping on CentOS 8 due to https://github.com/ansible/ansible/issues/64750 - when: not (ansible_facts.distribution == "CentOS" and ansible_distribution_major_version is version('8', '==')) # firewalld port operation test cases - include_tasks: port_test_cases.yml @@ -19,4 +17,4 @@ - import_tasks: source_test_cases.yml # firewalld zone target operation test cases -- import_tasks: zone_target_test_cases.yml +- import_tasks: zone_target_test_cases.yml \ No newline at end of file diff --git a/tests/integration/targets/setup_pkg_mgr/tasks/main.yml b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml new file mode 100644 index 0000000000..24d0222865 --- /dev/null +++ b/tests/integration/targets/setup_pkg_mgr/tasks/main.yml @@ -0,0 +1,17 @@ +--- +#################################################################### +# WARNING: These are designed specifically for Ansible tests # +# and should not be used as examples of how to write Ansible roles # +#################################################################### + +- set_fact: + pkg_mgr: community.general.pkgng + ansible_pkg_mgr: community.general.pkgng + cacheable: yes + when: ansible_os_family == "FreeBSD" + +- set_fact: + pkg_mgr: community.general.zypper + ansible_pkg_mgr: community.general.zypper + cacheable: yes + when: ansible_os_family == "Suse"