Merge "Switch integration tests to run with python3"
This commit is contained in:
commit
396ee88ef2
|
@ -39,7 +39,7 @@
|
||||||
vars:
|
vars:
|
||||||
devstack_services:
|
devstack_services:
|
||||||
horizon: true
|
horizon: true
|
||||||
tox_envlist: py27integration
|
tox_envlist: integration
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: horizon-dsvm-tempest-plugin
|
name: horizon-dsvm-tempest-plugin
|
||||||
|
|
|
@ -200,6 +200,9 @@ class BaseTestCase(testtools.TestCase):
|
||||||
|
|
||||||
super(BaseTestCase, self).addOnException(wrapped_handler)
|
super(BaseTestCase, self).addOnException(wrapped_handler)
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash((type(self), self._testMethodName))
|
||||||
|
|
||||||
def _configure_log(self):
|
def _configure_log(self):
|
||||||
"""Configure log to capture test logs include selenium logs.
|
"""Configure log to capture test logs include selenium logs.
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import functools
|
||||||
import importlib
|
import importlib
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -316,6 +317,16 @@ class Navigation(object):
|
||||||
def _create_go_to_method(cls, path, class_name=None):
|
def _create_go_to_method(cls, path, class_name=None):
|
||||||
go_to_method = Navigation.GoToMethodFactory(path, class_name)
|
go_to_method = Navigation.GoToMethodFactory(path, class_name)
|
||||||
inst_method = six.create_unbound_method(go_to_method, Navigation)
|
inst_method = six.create_unbound_method(go_to_method, Navigation)
|
||||||
|
|
||||||
|
# TODO(e0ne): remove python2 support once all integration jobs
|
||||||
|
# will be switched to python3.
|
||||||
|
if six.PY3:
|
||||||
|
def _go_to_page(self, path):
|
||||||
|
return Navigation._go_to_page(self, path)
|
||||||
|
|
||||||
|
wrapped_go_to = functools.partialmethod(_go_to_page, path)
|
||||||
|
setattr(Navigation, inst_method.name, wrapped_go_to)
|
||||||
|
else:
|
||||||
setattr(Navigation, inst_method.name, inst_method)
|
setattr(Navigation, inst_method.name, inst_method)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
6
tox.ini
6
tox.ini
|
@ -107,15 +107,15 @@ setenv =
|
||||||
SKIP_UNITTESTS=1
|
SKIP_UNITTESTS=1
|
||||||
commands = {[unit_tests]commands}
|
commands = {[unit_tests]commands}
|
||||||
|
|
||||||
[testenv:py27integration]
|
[testenv:integration]
|
||||||
envdir = {toxworkdir}/py27
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/venv
|
||||||
# Run integration tests only
|
# Run integration tests only
|
||||||
passenv = AVCONV_INSTALLED
|
passenv = AVCONV_INSTALLED
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONHASHSEED=0
|
PYTHONHASHSEED=0
|
||||||
INTEGRATION_TESTS=1
|
INTEGRATION_TESTS=1
|
||||||
SELENIUM_HEADLESS=1
|
SELENIUM_HEADLESS=1
|
||||||
basepython = python2.7
|
|
||||||
commands = {envpython} {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --verbosity 2 --tag integration {posargs}
|
commands = {envpython} {toxinidir}/manage.py test openstack_dashboard --settings=openstack_dashboard.test.settings --verbosity 2 --tag integration {posargs}
|
||||||
|
|
||||||
[testenv:npm]
|
[testenv:npm]
|
||||||
|
|
Loading…
Reference in New Issue