11 Commits

Author SHA1 Message Date
Federico Ressi
bdca6ee913 Add passenv vars to tox neutron virutalenv to allow connecting to OS
Change-Id: I522afee9ebc67562ef85e49a24c7c16626c6dce5
2019-02-27 15:06:28 +00:00
Federico Ressi
487281e7a7 Create abstract fixture manager
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
2018-12-19 10:57:32 +01:00
abregman
1d40d26c04 Add method to Ansible manager to run playbooks
This will allow us to support resources creation by using
Ansible playbooks.

Also, updated the floatinip playbook to include tasks for removing
an istnace. As opposed to Heat, where we can just specify the stack
name to remove it, to remove Ansible resources we need
to specify their names (since there is no bundling of resources).

Also, updated pipfile with Ansible requirement and removed walk
assert since there is no need to test it, it doesn't tells us
anything about Tobiko funcionaility.

Change-Id: I7581818934fca635ddb9b037ecee7ceae7a02010
2018-12-13 00:16:16 +02:00
Federico Ressi
4af5ede78b Recreate stacks before executing scenario tests.
Change-Id: Iee79f1d26e1db5538c8ed265bcb0889bca4552a8
2018-12-07 14:59:55 +00:00
Federico Ressi
895602c93e Split tox environments requirements files
- add py36 environment
- separate unit tests requirements from neturon test cases
- rename zuul project file
- remote tempest from unit tests requirements

Change-Id: I7b054f679c44cde70d00d1f030853b0c6f528d4d
2018-12-05 08:28:32 +01:00
Federico Ressi
3fc234c807 Use Python3 for running neutron tests.
Change-Id: I61a6f1447221c34fdc84fd30fb902819367e0553
2018-12-04 09:13:32 +01:00
Federico Ressi
6ee6d610dc Split tox environments (pep8, pylint, py27, py35 and neutron)
- separate pylint tox environment from pep8 one
- separate neutron tox environment from base ones (py27,py35,...)

Change-Id: Ib6e04a6c0d7e49a49c3d4386e15434f4d7b18502
2018-12-03 12:33:41 +00:00
Federico Ressi
103c8af376 Add pylint static analysis test.
Change-Id: I8722db76ff769f65c6232959592898cbedec583c
2018-11-27 10:37:24 +01:00
Federico Ressi
b5a02e0a29 Get code coverage when running test cases.
Change-Id: Ieae7e463ca766541fa0d085d04a6963e251a554f
2018-11-26 15:57:14 +01:00
Federico Ressi
c8135cebbf Split framework dependencies from test dependencies.
Let separate test cases (tobiko.tests package) from framework
(the rest of tobiko).

- Move test case dependencies to test-requirements.txt file.
- Keep only requirements.txt as framework requirements file.
- Add python-networkclient dependency to tobiko framework
- update tox.ini to use it for checking code before committing it

Change-Id: I0bc433153e00a1c83dbf691bfe058a1ccb1a49dd
2018-11-22 14:31:38 +01:00
Federico Ressi
0377537dc0 Create tox.ini file.
Configure with minimal requirements for running -
  pep8 - flake8 verifications
  py27/py35 - unittests

Change-Id: If09bab1f0a8501afddd720cf9ea9335867072e1d
2018-08-23 08:01:55 +02:00