From f3dcba435089747ff0e0fc36f5bb9cf20da61184 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 26 Jun 2025 09:31:44 +0200 Subject: [PATCH] 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 --- tests/tasks/test_802.1x_capath.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/tasks/test_802.1x_capath.yml b/tests/tasks/test_802.1x_capath.yml index 4f6b8c5..a835528 100644 --- a/tests/tasks/test_802.1x_capath.yml +++ b/tests/tasks/test_802.1x_capath.yml @@ -16,9 +16,6 @@ - NetworkManager-1.18.4-3.el7.x86_64 - NetworkManager-1.20.0-3.el8.x86_64 - NetworkManager-1.22.8-4.el8.x86_64 - - NetworkManager-1.20.4-1.fc31.x86_64 - - NetworkManager-1.22.10-1.fc32.x86_64 - - NetworkManager-1.22.12-1.fc32.x86_64 - name: Create directory for ca_path test file: path: "/etc/pki/tls/my_ca_certs" @@ -103,8 +100,7 @@ expected_failure: "{{ __network_nm_nvr.stdout in __NM_capath_ignored_NVRs }}" failure: "{{ __network_connections_result is failed }}" assert: - that: (failure and expected_failure) or - (not failure and not expected_failure) + that: failure == expected_failure msg: "Role {{ failure | ternary('failed', 'did not fail') }} but was expected {{ expected_failure | ternary('', 'not') }} to fail. NM NVR: {{ __network_nm_nvr.stdout }}"