#7254 test_caless: fix http.p12 is not valid and provide domain_level for replica tests
Closed: fixed Opened by mreznik.

Test fix

test_caless: fix http.p12 is not valid and provide domain_level for replica tests.

Fixes:

ipa.test_integration.test_caless.TestServerInstall.test_invalid_ds_cn
ipa.test_integration.test_caless.TestReplicaInstall.test_wildcard_http
ipa.test_integration.test_caless.TestReplicaInstall.test_wildcard_ds
ipa.test_integration.test_caless.TestReplicaInstall.test_http_san
ipa.test_integration.test_caless.TestReplicaInstall.test_ds_san
ipa.test_integration.test_caless.TestReplicaInstall.test_interactive_missing_http_pkcs_password
ipa.test_integration.test_caless.TestReplicaInstall.test_interactive_missing_ds_pkcs_password
ipa.test_integration.test_caless.TestReplicaInstall.test_no_http_password
ipa.test_integration.test_caless.TestReplicaInstall.test_no_ds_password

Metadata Update from @mreznik:
- Issue assigned to mreznik

Metadata Update from @mreznik:
- Issue tagged with: tests

There are currently two different failures:

In "ipa.test_integration.test_caless.TestServerInstall.test_invalid_ds_cn"

E       AssertionError: ipapython.admintool: ERROR    The server certificate in http.p12 is not valid: invalid for server vm-198.abc.idm.lab.eng.brq.redhat.com
E         ipapython.admintool: ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information
E         
E       assert 'The server certificate in dirsrv.p12 is not valid: invalid for server vm-198.abc.idm.lab.eng.brq.redhat.com' in 'ipapython.admintool: ERROR    The server certificate in http.p12 is not valid: invalid for server vm-198.abc.idm.lab....n.admintool: ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information\n'
E        +  where 'ipapython.admintool: ERROR    The server certificate in http.p12 is not valid: invalid for server vm-198.abc.idm.lab....n.admintool: ERROR    The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information\n' = <pytest_multihost.transport.SSHCommand object at 0x7f8415adaba8>.stderr_text

As in the test case we are not creating new valid http.p12 cert and inheriting the previous invalid one from "test_invalid_http_cn"

And the rest of the failures are related to:

    @replica_install_teardown
    def test_wildcard_http(self):
        "IPA replica install with wildcard HTTP certificate"
        self.create_pkcs12('ca1/wildcard', filename='http.p12')
        self.create_pkcs12('ca1/replica', filename='dirsrv.p12')
        result = self.prepare_replica(http_pkcs12='http.p12',
                                      dirsrv_pkcs12='dirsrv.p12')
        assert result.returncode == 0
>       if self.domain_level > DOMAIN_LEVEL_0:
E       TypeError: '>' not supported between instances of 'NoneType' and 'int'

Because we were getting None as domain_level till now and with Py3 it started failing.

Metadata Update from @mreznik:
- Issue set to the milestone: FreeIPA 4.6.2

master:

  • 495b85793c7cdaab58bf36d45d88e252612f150a test_caless: fix TypeError on domain_level compare
  • cedd52d7f96f9d9db74b1b45e0c2a9e12532fa5c test_caless: fix http.p12 is not valid

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

ipa-4-6:

  • 3cd3f224096bfcb571b55693b3a3ecfa69931095 test_caless: fix TypeError on domain_level compare
  • d94ffdb795e150d39302d0f6d361257350a5aaad test_caless: fix http.p12 is not valid
Metadata