From 9371bc50406db52a8bb1a4fc9de8a29a93fae75a Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Thu, 28 Aug 2025 13:53:33 -0600 Subject: [PATCH] test: skip 802_1x tests on el7, RHEL other than 8 802_1x tests are only supported on EL8 and later, and RHEL only on 8. Signed-off-by: Rich Megginson --- tests/ensure_provider_tests.py | 14 ++++++++++---- tests/tests_802_1x_nm.yml | 5 +++-- tests/tests_802_1x_updated_nm.yml | 5 +++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/ensure_provider_tests.py b/tests/ensure_provider_tests.py index 6bffd15..c01ff39 100755 --- a/tests/ensure_provider_tests.py +++ b/tests/ensure_provider_tests.py @@ -65,12 +65,18 @@ MINIMUM_VERSION = "minimum_version" EXTRA_RUN_CONDITION = "extra_run_condition" NM_ONLY_TESTS = { "playbooks/tests_802_1x_updated.yml": { - EXTRA_RUN_CONDITION: "ansible_distribution != 'RedHat' or\n ansible_distr\ -ibution_major_version | int < 9", + EXTRA_RUN_CONDITION: ( + "(ansible_distribution != 'RedHat' and\n" + " ansible_distribution_major_version | int > 7) or\n" + " ansible_distribution_major_version | int == 8" + ), }, "playbooks/tests_802_1x.yml": { - EXTRA_RUN_CONDITION: "ansible_distribution != 'RedHat' or\n ansible_distr\ -ibution_major_version | int < 9", + EXTRA_RUN_CONDITION: ( + "(ansible_distribution != 'RedHat' and\n" + " ansible_distribution_major_version | int > 7) or\n" + " ansible_distribution_major_version | int == 8" + ), }, "playbooks/tests_ignore_auto_dns.yml": {}, "playbooks/tests_bond_options.yml": {}, diff --git a/tests/tests_802_1x_nm.yml b/tests/tests_802_1x_nm.yml index 043371a..29baafa 100644 --- a/tests/tests_802_1x_nm.yml +++ b/tests/tests_802_1x_nm.yml @@ -21,5 +21,6 @@ import_playbook: playbooks/tests_802_1x.yml when: - ansible_distribution_major_version != '6' - - ansible_distribution != 'RedHat' or - ansible_distribution_major_version | int < 9 + - (ansible_distribution != 'RedHat' and + ansible_distribution_major_version | int > 7) or + ansible_distribution_major_version | int == 8 diff --git a/tests/tests_802_1x_updated_nm.yml b/tests/tests_802_1x_updated_nm.yml index 03c8826..8e9b45d 100644 --- a/tests/tests_802_1x_updated_nm.yml +++ b/tests/tests_802_1x_updated_nm.yml @@ -21,5 +21,6 @@ import_playbook: playbooks/tests_802_1x_updated.yml when: - ansible_distribution_major_version != '6' - - ansible_distribution != 'RedHat' or - ansible_distribution_major_version | int < 9 + - (ansible_distribution != 'RedHat' and + ansible_distribution_major_version | int > 7) or + ansible_distribution_major_version | int == 8