- add retry_test_case decorator
- make typing more explicit
- add support for default retry parameters
Change-Id: I0a5feb9f826416e45cc51bebf467e576c91ebb29
This also merges testcase modules in tobiko.common
package so that there is only one.
Add unit tests for [get|push|pop]_test_case functions.
Change-Id: I0d1d9227dc7ce0e30c327d50f719dc1fbe24e682
In neutron agents faults tests module, there is test which looks
for neutron-ovs-agent which runs on same host as VM is spawned to
stop this neutron-ovs-agent.
This usually worked fine, but in case e.g. of TripleO hostname
given in neutron agents list contained full domain name and
hostname from nova's output containes short name.
Because of this missmatch there was no neutron-ovs-agent found to
stop and test was failing.
This patch fixes this issue by changing comparison of hostnames
of vm's host and agent's host.
Additionally this patch adds proper handling of the case when
neutron-ovs-agent isn't found.
Change-Id: If240188392feb6067af4f9a4a82e8ed95b4b99ee
try:
...
except SomeException:
with tobiko.exc_info():
# It will reraise original exception at the end of this block
...
Change-Id: Icad6bdd7261dd9b972b5b33110041876ca488070
Add a new decorator that improve property decorator
by allowing to invoke getter method from fixture class.
This makes below code to work:
import tobiko
class MyFixture(tobiko.SharedFixture):
@tobiko.fixture_property
def my_property():
return ...
assert tibiko.get_fixture(MyFixture).my_property == MyFixture.my_property
Change-Id: I72b6b8305823bb7be2bee6a806a6bced915229f6
Command "tobiko-fixture list" now includes also fixtures
defined as required fixtures for test classes.
Change-Id: If9b9fb05dbdc7129ac50d71904c91a3ee04648f6
Refactor fixture manager to avoid reverse control pattern.
test cases method dependency on fixtures is now obtained
from default parameter values discovered from test case
methods signatures.
Change-Id: I4eb04189adb9aab27923b167910f32c49c33d8e0
Allow to decople global fixture definition from test
cases.
Fixtures can be defined as a subclass of tobiko.Fixture
class MyFixture(tobiko.Fixture):
...
Tobiko will reference to it as: '<module-name>.MyFixture'
where module-name is the full name of the module where
the class is defined. Fixture name are accessible via
'fixture_name' class attribute.
tobiko.Fixture subclass has to implement bellow methods
def create_fixture(self):
# mandatory
...
def delete_fixture(self):
# optional method
...
Test cases to create a fixture should mane one of below
calls:
fixture = tobiko.create_fixture(<fixture-name>)
fixture = tobiko.create_fixture(<fixture-class>)
Existing fixtures can be find using one of below calls:
fixture = tobiko.get_fixture(<fixture-name>)
fixture = tobiko.get_fixture(<fixture-class>)
Existing fixtures can be deleted using one of below calls:
tobiko.delete_fixture(<fixture-name>)
tobiko.delete_fixture(<fixture-class>)
Change-Id: I5c104a732234ab2183fbfb9909cba4a445f59b60