Skip to content

Commit 9371bc5

Browse files
committed
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 <[email protected]>
1 parent 942e01d commit 9371bc5

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

tests/ensure_provider_tests.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,18 @@
6565
EXTRA_RUN_CONDITION = "extra_run_condition"
6666
NM_ONLY_TESTS = {
6767
"playbooks/tests_802_1x_updated.yml": {
68-
EXTRA_RUN_CONDITION: "ansible_distribution != 'RedHat' or\n ansible_distr\
69-
ibution_major_version | int < 9",
68+
EXTRA_RUN_CONDITION: (
69+
"(ansible_distribution != 'RedHat' and\n"
70+
" ansible_distribution_major_version | int > 7) or\n"
71+
" ansible_distribution_major_version | int == 8"
72+
),
7073
},
7174
"playbooks/tests_802_1x.yml": {
72-
EXTRA_RUN_CONDITION: "ansible_distribution != 'RedHat' or\n ansible_distr\
73-
ibution_major_version | int < 9",
75+
EXTRA_RUN_CONDITION: (
76+
"(ansible_distribution != 'RedHat' and\n"
77+
" ansible_distribution_major_version | int > 7) or\n"
78+
" ansible_distribution_major_version | int == 8"
79+
),
7480
},
7581
"playbooks/tests_ignore_auto_dns.yml": {},
7682
"playbooks/tests_bond_options.yml": {},

tests/tests_802_1x_nm.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
import_playbook: playbooks/tests_802_1x.yml
2222
when:
2323
- ansible_distribution_major_version != '6'
24-
- ansible_distribution != 'RedHat' or
25-
ansible_distribution_major_version | int < 9
24+
- (ansible_distribution != 'RedHat' and
25+
ansible_distribution_major_version | int > 7) or
26+
ansible_distribution_major_version | int == 8

tests/tests_802_1x_updated_nm.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
import_playbook: playbooks/tests_802_1x_updated.yml
2222
when:
2323
- ansible_distribution_major_version != '6'
24-
- ansible_distribution != 'RedHat' or
25-
ansible_distribution_major_version | int < 9
24+
- (ansible_distribution != 'RedHat' and
25+
ansible_distribution_major_version | int > 7) or
26+
ansible_distribution_major_version | int == 8

0 commit comments

Comments
 (0)