Unit tests fail with cryptography < 1.6

Bug #1664515 reported by Javier Peña
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-magnumclient
New
Undecided
Jason Dunsmore

Bug Description

Trying to run the unit tests with any version of cryptography < 1.6 fails with the following errors:

======================================================================
FAIL: magnumclient.tests.v1.test_bays_shell.ShellTest.test_bay_config_swarm_success_with_tls_non_csh
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "magnumclient/tests/v1/test_bays_shell.py", line 388, in test_bay_config_swarm_success_with_tls_non_csh
    tls_disable=False)
  File "/tmp/venv/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "magnumclient/tests/v1/test_bays_shell.py", line 372, in _test_bay_config_success
    self._test_arg_success('bay-config test_bay')
  File "magnumclient/tests/v1/shell_test_base.py", line 91, in _test_arg_success
    stdout, stderr = self.shell(command)
  File "magnumclient/tests/utils.py", line 161, in shell
    _shell.main(argstr.split())
  File "magnumclient/shell.py", line 665, in main
    args.func(self.cs, args)
  File "<decorator-gen-22>", line 2, in do_bay_config
  File "magnumclient/common/cliutils.py", line 97, in wrapper
    return func(*args, **kwargs)
  File "magnumclient/v1/bays_shell.py", line 245, in do_bay_config
    tls = _generate_csr_and_key()
  File "magnumclient/v1/bays_shell.py", line 351, in _generate_csr_and_key
    backend=default_backend())
  File "/tmp/venv/lib/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 41, in default_backend
    _default_backend = MultiBackend(_available_backends())
  File "/tmp/venv/lib/python2.7/site-packages/cryptography/hazmat/backends/multibackend.py", line 33, in __init__
    "Multibackend cannot be initialized with no backends. If you "
ValueError: Multibackend cannot be initialized with no backends. If you are seeing this error when trying to use default_backend() please try uninstalling and reinstalling cryptography.
Ran 351 tests in 1.108s (+0.055s)
FAILED (id=17, failures=8)

Based on https://github.com/openstack/python-magnumclient/blob/master/requirements.txt#L17, lower versions should be supported.

Changed in python-magnumclient:
assignee: nobody → Jason Dunsmore (jasondunsmore)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/requirements 1.1.0

This issue was fixed in the openstack/requirements 1.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.