mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #38213 from rallytime/skip-tls-test
Skip test_cert_info tls unit test on pyOpenSSL upstream errors
This commit is contained in:
commit
9d497bc74c
1 changed files with 15 additions and 1 deletions
|
@ -273,7 +273,21 @@ class TLSAddTestCase(TestCase):
|
|||
del source['extensions']
|
||||
with patch('salt.utils.fopen',
|
||||
mock_open(read_data=_TLS_TEST_DATA['ca_cert'])):
|
||||
result = ignore_extensions(tls.cert_info(certp))
|
||||
try:
|
||||
result = ignore_extensions(tls.cert_info(certp))
|
||||
except AttributeError as err:
|
||||
# PyOpenSSL version 16.0.0 has an upstream bug in it where a call is made
|
||||
# in OpenSSL/crypto.py in the get_signature_algorithm function referencing
|
||||
# the cert_info attribute, which doesn't exist. This was fixed in subsequent
|
||||
# releases of PyOpenSSL with https://github.com/pyca/pyopenssl/pull/476
|
||||
if '\'_cffi_backend.CDataGCP\' object has no attribute \'cert_info\'' == str(err):
|
||||
self.skipTest(
|
||||
'Encountered an upstream error with PyOpenSSL: {0}'.format(
|
||||
err
|
||||
)
|
||||
)
|
||||
result = {}
|
||||
|
||||
remove_not_in_result(ret, result)
|
||||
self.assertEqual(result, ret)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue