Skip to content

Commit f3dcba4

Browse files
committed
tests: Simplify expected failure check in test_802.1x_capath.yml
Simplify the cumbersome assertion. Drop the ancient Fedora releases from the __NM_capath_ignored_NVRs list. Signed-off-by: Martin Pitt <[email protected]>
1 parent 6dc78cb commit f3dcba4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/tasks/test_802.1x_capath.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
- NetworkManager-1.18.4-3.el7.x86_64
1717
- NetworkManager-1.20.0-3.el8.x86_64
1818
- NetworkManager-1.22.8-4.el8.x86_64
19-
- NetworkManager-1.20.4-1.fc31.x86_64
20-
- NetworkManager-1.22.10-1.fc32.x86_64
21-
- NetworkManager-1.22.12-1.fc32.x86_64
2219
- name: Create directory for ca_path test
2320
file:
2421
path: "/etc/pki/tls/my_ca_certs"
@@ -103,8 +100,7 @@
103100
expected_failure: "{{ __network_nm_nvr.stdout in __NM_capath_ignored_NVRs }}"
104101
failure: "{{ __network_connections_result is failed }}"
105102
assert:
106-
that: (failure and expected_failure) or
107-
(not failure and not expected_failure)
103+
that: failure == expected_failure
108104
msg: "Role {{ failure | ternary('failed', 'did not fail') }} but was expected
109105
{{ expected_failure | ternary('', 'not') }} to fail.
110106
NM NVR: {{ __network_nm_nvr.stdout }}"

0 commit comments

Comments
 (0)