ipatests: fix expected error message in test_commands

389ds does not return any more additional information
about a failing bind (to avoid leaking information).

As a consequence, when ipa-nis-manage is provided a
wrong password, the error message contains less info
as in the past and needs to be fixed.

Fixes: https://pagure.io/freeipa/issue/8631
Reviewed-By: Kaleemullah Siddiqui <ksiddiqu@redhat.com>
This commit is contained in:
Florence Blanc-Renaud
2020-12-23 14:01:43 +01:00
parent d0a1606e77
commit e7949e2a0f
+4 -5
View File
@@ -1286,17 +1286,16 @@ class TestIPACommand(IntegrationTest):
This testcase checks if ipa-nis-manage enable
command throws error on console for invalid DS admin password
"""
msg = (
"Insufficient access: Invalid credentials "
"Invalid credentials\n"
)
msg1 = "Insufficient access: "
msg2 = "Invalid credentials"
result = self.master.run_command(
["ipa-nis-manage", "enable"],
stdin_text='Invalid_pwd',
raiseonerr=False,
)
assert result.returncode == 1
assert msg in result.stderr_text
assert msg1 in result.stderr_text
assert msg2 in result.stderr_text
def test_pkispawn_log_is_present(self):
"""