From f2a1d50b82cb8af31e5d55c045c8dc72c98c7694 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 28 Nov 2023 11:48:31 +0100 Subject: [PATCH] test_pwpolicy: minlength parameter can be reset with empty string now The reset of the minlength parameter failed with an internal error so far. This has been fixed in IPA and therefore requires to fix the test in ansible-freeipa also. Related: https://pagure.io/freeipa/issue/9297 --- tests/pwpolicy/test_pwpolicy.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/tests/pwpolicy/test_pwpolicy.yml b/tests/pwpolicy/test_pwpolicy.yml index 83f1763..340f64f 100644 --- a/tests/pwpolicy/test_pwpolicy.yml +++ b/tests/pwpolicy/test_pwpolicy.yml @@ -176,21 +176,10 @@ minlength: "" register: result failed_when: - result.changed or (result.failed and not - ("an internal error has occurred" in result.msg or - "int() argument must be" in result.msg)) - when: ipa_version is version("4.9", ">=") - - - name: Ensure minlength is not cleared due to FreeIPA issue - ipapwpolicy: - ipaadmin_password: SomeADMINpassword - ipaapi_context: "{{ ipa_context | default(omit) }}" - name: ops - minlength: "" - register: result - failed_when: not result.changed or result.failed - when: ipa_version is version("4.7", "<") + ("an internal error has occurred" in result.msg or + "int() argument must be" in result.msg)) + or (not result.failed and not result.changed) - name: Execute tests if ipa_version >= 4.9.0 when: ipa_version is version("4.9", ">=") -- 2.42.0