caless tests: decode cert bytes in debug log

Bytes would cause the logger to throw up while interpolating the
string.

Reviewed-By: Michal Reznik <mreznik@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-11-06 09:11:39 +01:00
parent a3009b392a
commit 983234c91b
No known key found for this signature in database
GPG Key ID: C98C414936B1A7F3

View File

@ -381,7 +381,7 @@ class CALessBase(IntegrationTest):
# Check the cert PEM file
remote_cacrt = host.get_file_contents(paths.IPA_CA_CRT)
logger.debug('%s:/etc/ipa/ca.crt contents:\n%s',
host, remote_cacrt)
host, remote_cacrt.decode('utf-8'))
cacrt = x509.load_unknown_x509_certificate(remote_cacrt)
logger.debug('%s: Decoded /etc/ipa/ca.crt:\n%r',
host, cacrt.public_bytes(x509.Encoding.PEM))