#9575 Update of a test test_adtrust_install_with_incorrect_admin_password
Closed: fixed by frenaud. Opened by ebelko.

Issue

Update of a test to check only if ipa-adtrust-install cannot be run with incorrect password for admin, no need to check specific message
Error message is thrown from https://github.com/freeipa/freeipa/blob/master/install/tools/ipa-adtrust-install.in#L174-L185 (L182) it is different now, which is caused by change in implementation of krb_utils.get_principal() now using GSSAPI, due to https://github.com/freeipa/freeipa/pull/7186/commits/c6bfab672dcf0bae9c5ba5d95c701bbb5d141593 .

Test failure, affected version RHEL8.10 (both STIG and nonSTIG)
related failure:

self = <ipatests.test_integration.test_adtrust_install.TestIpaAdTrustInstall object at 0x7f42888359e8>
    def test_adtrust_install_with_incorrect_admin_password(self):
        """
        Test to check ipa-adtrust-install with incorrect admin
        password
        """
        password = "wrong_pwd"
        msg = (
            "Must have Kerberos credentials to setup AD trusts on server: "
            "Major (458752): No credentials were supplied, or the credentials "
            "were unavailable or inaccessible, Minor (2529639053): "
            "No Kerberos credentials available (default cache: KCM:)\n"
        )
        self.master.run_command(["kdestroy", "-A"])
        result = self.master.run_command(
            ["ipa-adtrust-install", "-A", "admin", "-a",
             password, "-U"], raiseonerr=False
        )
>       assert msg in result.stderr_text
E       AssertionError: assert 'Must have Kerberos credentials to setup AD trusts on server: Major (458752): No credentials were supplied, or the credentials were unavailable or inaccessible, Minor (2529639053): No Kerberos credentials available (default cache: KCM:)\n' in 'Must have Kerberos credentials to setup AD trusts on server: Major (851968): Unspecified GSS failure.  Minor code may provide more information, Minor (2529639053): No Kerberos credentials available (default cache: KCM:)\n'
E        +  where 'Must have Kerberos credentials to setup AD trusts on server: Major (851968): Unspecified GSS failure.  Minor code may provide more information, Minor (2529639053): No Kerberos credentials available (default cache: KCM:)\n' = <pytest_multihost.transport.SSHCommand object at 0x7f4286cae0f0>.stderr_text

@ebelko is there a test failure? I don’t see any failure for this test in our upstream nightlies. If there is a failure on RHEL no need to provide the internal link but it would help to know the version.

@frenaud thank you for comment, affected version is RHEL8.10, for both STIG and nonSTIG, updated this issue.

master:

  • 47920e78c81380c0a40986e55f05246aac132fbb ipatests: Update ipa-adtrust-install test

ipa-4-11:

  • 26ceb4efecf4d00b908cbb7f5b408995ca3de52d ipatests: Update ipa-adtrust-install test

ipa-4-10:

  • b729d6cbc27f60293054225e0d3d9d02169fd52f ipatests: Update ipa-adtrust-install test

ipa-4-9:

  • 8a007132e26bd36e5f7857fa90045fa35e8c528a ipatests: Update ipa-adtrust-install test

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata