Fix py35 and pypy tox env
The basepython line was causing the py35 tests to actually run under python2. Whoops. It was doing the same to pypy. Add pypy to bindep with the pypy tag. Cryptography and the version of pypi in xenial are incompatible, so update the pypy job to run on fedora-26 instead, which has a new enough pypy. Shift the line so that it only applies to functional and ansible tests, since that's where it's used. Depends-On: I7c22e23b73ddfc18ee28e87d34d1988417b49ccb Change-Id: Ia27a0aa0633dcf48c1bab06b3c803f996eae9efa
This commit is contained in:
parent
eb9d3a5a46
commit
7fb95b9e75
@ -196,16 +196,19 @@
|
|||||||
- project:
|
- project:
|
||||||
name: openstack/python-openstacksdk
|
name: openstack/python-openstacksdk
|
||||||
templates:
|
templates:
|
||||||
- openstack-pypy-jobs
|
|
||||||
- openstacksdk-functional-tips
|
- openstacksdk-functional-tips
|
||||||
- openstacksdk-tox-tips
|
- openstacksdk-tox-tips
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
|
- openstack-tox-pypy:
|
||||||
|
nodeset: fedora-26
|
||||||
- openstacksdk-functional-devstack
|
- openstacksdk-functional-devstack
|
||||||
- openstacksdk-functional-devstack-magnum:
|
- openstacksdk-functional-devstack-magnum:
|
||||||
voting: false
|
voting: false
|
||||||
- openstacksdk-functional-devstack-python3
|
- openstacksdk-functional-devstack-python3
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
|
- openstack-tox-pypy:
|
||||||
|
nodeset: fedora-26
|
||||||
- openstacksdk-functional-devstack
|
- openstacksdk-functional-devstack
|
||||||
- openstacksdk-functional-devstack-python3
|
- openstacksdk-functional-devstack-python3
|
||||||
|
@ -6,3 +6,7 @@ python-dev [platform:dpkg]
|
|||||||
python-devel [platform:rpm]
|
python-devel [platform:rpm]
|
||||||
libffi-dev [platform:dpkg]
|
libffi-dev [platform:dpkg]
|
||||||
libffi-devel [platform:rpm]
|
libffi-devel [platform:rpm]
|
||||||
|
openssl-devel [platform:rpm]
|
||||||
|
pypy [pypy]
|
||||||
|
pypy-dev [platform:dpkg pypy]
|
||||||
|
pypy-devel [platform:rpm pypy]
|
||||||
|
@ -376,7 +376,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||||||
Test that a server passed user-data sends it base64 encoded.
|
Test that a server passed user-data sends it base64 encoded.
|
||||||
"""
|
"""
|
||||||
user_data = self.getUniqueString('user_data')
|
user_data = self.getUniqueString('user_data')
|
||||||
user_data_b64 = base64.b64encode(user_data).decode('utf-8')
|
user_data_b64 = base64.b64encode(
|
||||||
|
user_data.encode('utf-8')).decode('utf-8')
|
||||||
fake_server = fakes.make_fake_server('1234', '', 'BUILD')
|
fake_server = fakes.make_fake_server('1234', '', 'BUILD')
|
||||||
fake_server['user_data'] = user_data
|
fake_server['user_data'] = user_data
|
||||||
|
|
||||||
|
@ -1307,8 +1307,10 @@ class TestResourceFind(base.TestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def existing(cls, **kwargs):
|
def existing(cls, **kwargs):
|
||||||
|
response = mock.Mock()
|
||||||
|
response.status_code = 404
|
||||||
raise exceptions.NotFoundException(
|
raise exceptions.NotFoundException(
|
||||||
'Not Found', response=mock.Mock())
|
'Not Found', response=response)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def list(cls, session):
|
def list(cls, session):
|
||||||
@ -1485,6 +1487,7 @@ class TestWaitForDelete(base.TestCase):
|
|||||||
def test_success(self, mock_sleep):
|
def test_success(self, mock_sleep):
|
||||||
response = mock.Mock()
|
response = mock.Mock()
|
||||||
response.headers = {}
|
response.headers = {}
|
||||||
|
response.status_code = 404
|
||||||
resource = mock.Mock()
|
resource = mock.Mock()
|
||||||
resource.get.side_effect = [
|
resource.get.side_effect = [
|
||||||
None, None,
|
None, None,
|
||||||
|
3
tox.ini
3
tox.ini
@ -5,7 +5,6 @@ skipsdist = True
|
|||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
basepython = {env:OPENSTACKSDK_TOX_PYTHON:python2}
|
|
||||||
passenv = UPPER_CONSTRAINTS_FILE
|
passenv = UPPER_CONSTRAINTS_FILE
|
||||||
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
@ -25,6 +24,7 @@ commands = stestr --test-path ./openstack/tests/examples run {posargs}
|
|||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
|
basepython = {env:OPENSTACKSDK_TOX_PYTHON:python2}
|
||||||
passenv = OS_* OPENSTACKSDK_* UPPER_CONSTRAINTS_FILE
|
passenv = OS_* OPENSTACKSDK_* UPPER_CONSTRAINTS_FILE
|
||||||
commands = stestr --test-path ./openstack/tests/functional run --serial {posargs}
|
commands = stestr --test-path ./openstack/tests/functional run --serial {posargs}
|
||||||
stestr slowest
|
stestr slowest
|
||||||
@ -55,6 +55,7 @@ commands =
|
|||||||
|
|
||||||
[testenv:ansible]
|
[testenv:ansible]
|
||||||
# Need to pass some env vars for the Ansible playbooks
|
# Need to pass some env vars for the Ansible playbooks
|
||||||
|
basepython = {env:OPENSTACKSDK_TOX_PYTHON:python2}
|
||||||
passenv = HOME USER
|
passenv = HOME USER
|
||||||
commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs}
|
commands = {toxinidir}/extras/run-ansible-tests.sh -e {envdir} {posargs}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user