Commit Graph

6 Commits

Author SHA1 Message Date
Victoria Martinez de la Cruz 39d9896c47 Make manila-ui python3 compatible
In order to make manila-ui python3 compatible,
this patch set:
- replace dict.iteritems() with six.iteritems(dict)
- replace print msg with print(msg)
- replace dict.viewkeys() with error.keys()
- python 3 getting the keys() of a dict returns
  a dict_keys object instead of a list and hence
  sort() fails
- in python 2.x calling keys makes a copy of the key
  that you can iterate over while modifying the dict.
  This doesn't work in python 3.x because keys
  returns an iterator instead of a list.
  Another way is to use list to force a copy of the keys
  to be made.
- use getattr instead of relying on overriden __getattr__
  in the client to get params that not neccesarily need to
  be available (share_group_id and supports_share_migration)
- refactor ShareGroupTypeTests

Plus, enable py35 and py35dj20 jobs in tox and drop
old oslo-incubator files (install_venv.py)

Also add openstack-tox-py35 job to check python3 env.
openstack-tox-py35 should be defined in project-config later
but it is added to check python3 UT status.

Change-Id: I30582184904dc19e9cb4ca171b1fd2d161e09c48
2018-05-07 02:03:21 +09:00
vponomaryov c7591381d6 Fix 'cover' tox job
'cover' tox job fails on requirements version conflicts installing
venv. But the problem is that it fails installing second venv,
that is not used and is artifact of old approach for running tests.
So, disable installation of old venv and use only tox venv, that
works.

Change-Id: Ic66281cd952906b92bc14873f48d1daa4ad6eb2e
Closes-Bug: #1685325
2017-04-28 17:14:46 +03:00
zhangyanxian d3ece4b628 Fix some typos in cover.sh
TrivialFix

Change-Id: I9f03f797d99cfb6d77ea0d923568b5db8b3aa9f7
2016-12-16 02:29:53 +00:00
vponomaryov b27c49d034 Make 'cover' job use always venv
Without this change 'cover'job starts dialog for running
either in host env or venv and fails not getting proper choice.

Therefore, make it use venv always.

Change-Id: I411ac40a1fde61cbeb725cf5dba850ab6a82e95c
2016-04-28 18:52:03 +03:00
vponomaryov 72f6c06a11 Upgrade coverage tox job
Add ported from Manila project 'cover.sh' script that
allows to calculate coverage diff between last and previous commits.

Usage of new approach (with diff):

$ tox -e cover

To run old coverage approach use following:

./run_tests.sh --coverage --no-pep8

Change-Id: I8f6de6ba5cba2050771c4bead31baaf975e097b9
2016-04-20 14:37:33 +03:00
Gary W. Smith 436d6b2cac Enable unit tests to run standalone
Enable unit tests to be run standalane; that is, without having a
local copy of the horizon source.  This is primarly intended for use in
automated builds.  The approach, taken from tuskar-ui, is to add an
entry in test-requirements.txt that refers to a source tarball of
horizon which is expanded into the virtual environment, permitting
references to horizon and openstack_dashboard to resolve correctly.

Add additional tooling to support running tests and building virtual
environments to mirror what is done in horizon.
2015-04-20 15:08:53 -07:00