summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorMartin Babinsky <mbabinsk@redhat.com>2016-03-08 16:56:38 +0100
committerMartin Basti <mbasti@redhat.com>2016-03-08 20:22:55 +0100
commitabe3abb46699428038cd77f13b814de69fd7d0a2 (patch)
tree6e7da79864b30158a68c7c66a4da619678743c5d /ipatests
parentebbb2eba5bdf3eee9eca3e3db2b8964db5d8131f (diff)
downloadfreeipa-abe3abb46699428038cd77f13b814de69fd7d0a2.tar.gz
freeipa-abe3abb46699428038cd77f13b814de69fd7d0a2.tar.xz
freeipa-abe3abb46699428038cd77f13b814de69fd7d0a2.zip
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>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_xmlrpc/test_cert_plugin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipatests/test_xmlrpc/test_cert_plugin.py b/ipatests/test_xmlrpc/test_cert_plugin.py
index ba8dd4636..1276e9cf9 100644
--- a/ipatests/test_xmlrpc/test_cert_plugin.py
+++ b/ipatests/test_xmlrpc/test_cert_plugin.py
@@ -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):
"""