test_cert_plugin: use only first part of the hostname to construct short name

The short hostname construction for the negative test case in
test_cert_plugin::test_cert_find suite could not work when domain name was
different as hostname of the test runner, leading to test failure. A more
naive approach works better in this case.

https://fedorahosted.org/freeipa/ticket/5688

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Martin Babinsky 2016-03-08 16:56:38 +01:00 committed by Martin Basti
parent ebbb2eba5b
commit abe3abb466

View File

@ -224,7 +224,7 @@ class test_cert_find(XMLRPC_test):
"""
Test the `cert-find` command.
"""
short = api.env.host.replace('.' + api.env.domain, '')
short = api.env.host.split('.')[0]
def test_0001_find_all(self):
"""