Commit Graph

2 Commits

Author SHA1 Message Date
Ivan Kolodyazhny 1f80d94459 Use default Django test runner instead of nose
Nose has been in maintenance mode for the past several years. It has
issue with exit code [1] which leads to false positive results for our
seleniun-headless job.

This patch changes test runner for Horizon tests and does the following
things:

* Django test runner  executes test in a different order than Nose does.
  That's why we've got an issue with side-effect in
  horizon.tests.unit.tables.test_tables.MyToggleAction class. This patch
  adds workaround to it.
* Rename filename of test files to names starting with 'test_'
  so that the django test runner can find tests expectedly.
* '--with-html-output' option is temporary dropped and will be added in
  a following patch.
* Integraion tests is marked via django.test.tag mechanism which is
  introduced in Django 1.10
* 'selenium-headless' is broken now because we don't have geckodriver on
  gates, this patch makes it non-voting.
* 'tox -e cover' is fixed
* Remove @memorized decorator from
  dashboards.project.images.images.tables.filter_tenant_ids function.

[1] https://github.com/nose-devs/nose/issues/984

Depends-On: https://review.openstack.org/572095
Depends-On: https://review.openstack.org/572124
Depends-On: https://review.openstack.org/572390
Depends-On: https://review.openstack.org/572391

Related blueprint: improve-horizon-testing
Change-Id: I7fb2fd7dd40f301ea822154b9809a9a07610c507
2018-06-08 15:21:12 +03:00
Akihiro Motoki 4c8a294aee API micro-version support for multiple features
Previously horizon micro-version support only supports one feature,
but there is a case where we need to support more than one feature
using micro-versioning. For example, "instance_description" and
"auto_allocated_network" in the server create operation both require
micro-version. This case was not supported previously.

This commit changes get_microversion() function to take a feature list
and looks up a micro-version which supports all requested features.

A known limitation is that we need to re-call get_microversion() with
different feature(s) if no micro-version which satisfies all requested
features is found and we would like to look up a micro-version which
supports a subset of the requested features. Most features are expected
in recent API versions, so I believe this would be a minor limitation.

Change-Id: I46f1c7fa1ddcf1dfac93d921cffaf3aa5ac011a7
Related-Bug: #1690433
2017-12-03 07:59:32 +09:00