saltstack/salt-ci-images

[2018.3] m2crypto py3 test_x509 failures

Ch3LL opened this issue · 4 comments

Ch3LL commented

The following tests are failing on m2crypto python3 tests:

unit.modules.test_x509.X509TestCase.test_create_crl
unit.modules.test_x509.X509TestCase.test_create_key
unit.modules.test_x509.X509TestCase.test_revoke_certificate_with_crl

https://jenkinsci.saltstack.com/job/2018.3/view/Crypto/job/salt-centos-7-py3-m2crypto/38/

the test failures are due to str vs bytes issues in Python 3 for test_create_key and test_revoke_certificate_with_crl. testr_create_crl is failing due to callback is not bytes.

Typical encode|decode issues on Py3

see https://jenkinsci.saltstack.com/job/2018.3/view/Crypto/job/salt-centos-7-py3-m2crypto/52/

Ch3LL commented

@garethgreenaway can you take a look here?

@garethgreenaway checkout
393 e22df847 S Gareth J. Greenaway return salt.utils.stringutils.to_str(passphrase) salt/modules/x509.py from June 4th
M2Crypto/RSA.py expects the callback to be Callable, and not a string, the other unit tests appear to be a simple issue of string encoding, creating a cert returns a string or bytes, again salt/modules/x509.py

Examined latest test runs from Jan 31 for salt-centos-7-py3-m2crypto which showed these tests passing.
That test had a gem failure (integration.modules.test_gem.GemModuleTest.test_sources_add_remove) but that is for another issue.