4 Commits

Author SHA1 Message Date
Valeriy Ponomaryov
7962533b94 Fix usage of setUpClass method in functional tests
Class method 'setUpClass' is executed for each test of test suite that
appeared in new thread. It leads to creation of redundant resources,
and, hence, waste of resources.

So, add 'group_regex' option in testr config that will make all tests
of each class run in one thread.

Change-Id: I8100a98961791cee52b0866c7d593cc8371b3329
Closes-Bug: #1509460
2015-10-26 15:02:07 +02:00
vponomaryov
8760b9cde9 Implement functionality for functional tests using tempest-lib
Add generic functionality for functional tests using tempest-lib and
create related tox jobs.

Run of functional tests requires:

1) Access to deployed OpenStack with running, at least, Keystone and Manila
services.

2) Defined config options to be able to execute requests to Manila,
Manilaclient should know auth related information like username, password,
tenant_name, etc...

3) Run of functional tests searches for following optional env vars to be set:
'OS_MANILACLIENT_CONFIG_FILE' - name of conf file, default 'manilaclient.conf'
'OS_MANILACLIENT_CONFIG_DIR' - path to conf dir,
  default '%project_dir%/etc/manilaclient'
'OS_MANILA_EXEC_DIR' - path to dir with manilaclient executable,
  default '%project_dir%/.tox/functional/bin'

4) Config sample can be generated by following new tox job:
$ tox -egenconfig
it will create sample in
"%project_dir%/etc/manilaclient/manilaclient.conf.sample"
then just rename it removing ".sample" part and set option values.

To run functional tests use following new tox job:
$ tox -efunctional

To run only some specific tests use following:
$ tox -efunctional manilaclient.tests.functional.foo.bar

Partially implements blueprint functional-tests

Change-Id: I95a4e441d2143e51c54ec4fb47a069a91ed77dd7
2014-11-12 13:05:24 +02:00
vponomaryov
745adb323f Move tests into manilaclient package
tests/__init__.py implies a package in the global namespace called tests.
That's not what these are, they are tests in the manilaclient namespace.

Also moved unit tests to dir 'unit', it is done so because 'functional' tests
are expected to be added.

Change-Id: I801214b865e9cef8db7511f209dcf3c26b75d70f
2014-10-20 15:41:18 +03:00
119Vik
d6204d90bb added testr conf. pep8 tests fixed 2013-09-10 09:09:53 -04:00