28 Commits

Author SHA1 Message Date
Zuul
cd08e4b329 Merge "Update docs requirements and fix link" 2019-05-27 06:27:46 +00:00
Federico Ressi
a880634a6f Automatically select python version on scenario and fucntional tests
Change-Id: I6da8e7fd15f913758c562bcc5aa7baca6a9692a2
2019-05-27 06:20:27 +02:00
Federico Ressi
c97995dc9f Update docs requirements and fix link
- update documentation building requirement
- fix broken link in documentation page

Change-Id: I3b17aac420233b027acc14666fb50fdbd220b26d
2019-05-27 04:46:11 +02:00
Federico Ressi
4a1388c546 Pass to default python for static analisys tests
Change-Id: Ie6c379706153f5dfeb19d0df0a05fe0a2bebd2d7
2019-05-24 17:30:53 +02:00
Zuul
366f40e5d5 Merge "Rename package: tobiko.tests -> tobiko.tests.unit" 2019-05-24 06:10:08 +00:00
Federico Ressi
d762d0729d Rename package: tobiko.tests -> tobiko.tests.unit
The main reason is that it could get people confuse
to have functional and scenario test cases inside
the same package as unit tests cases.

Change-Id: I63330f383f01f04a45c5542d655a1bdb24c09b75
2019-05-24 06:54:40 +02:00
Federico Ressi
f3b835a57b Add tox environment to generate HTML test case reports.
By typing below commands it generates HTML report file
of Python test case results:

 tox -e report

It generates 'report/build/testr_results.html' file.

To run test cases (for example scenario tests) and produce
report HTML file it is possible to chain tox environment
names in a list. For example:

 tox -e scenario,report

Or simply:

 tox -e scenario
 tox -e report

This new environment is intended to be used in CI jobs
to produce reports after verifications.

Change-Id: I63d4d2977fb5b2c868361aa00db0e1334f33fa10
2019-05-23 13:04:16 +02:00
Federico Ressi
0112246649 Fix requirements and use ReadTheDocs HTML documentation theme
Change-Id: Ibc24055f05b880a5f21a415078472dff21a0fb9d
2019-05-07 17:00:32 +02:00
Federico Ressi
08d12255aa Create docs job and environment
- Add docs CI job and Tox environment
- Create RST documentation sckeleton
- Use OpenStack theme for releasenotes job.
- Move docs/ code to doc/ folder to conform to OpenStack standards.

Change-Id: I8b917abe46125fec32076637a041a728257fa96a
2019-04-26 11:13:01 +02:00
Federico Ressi
00f6cc0a41 Add devstack functional job
Create fuctional Tox environment
Add new Tobiko DevStack functional job
Move shell test cases to functional package.

Change-Id: I3a077d787ab0813b92b8c4f819a263cedf261b02
2019-04-25 16:58:00 +02:00
Federico Ressi
f77e61faf9 Add cover CI job and tox env
Change-Id: Idf6011265e5674fc0016771341f65fa2037cf510
2019-04-25 09:58:55 +00:00
Federico Ressi
a26d75e34e Refactor tox.ini to match OpenStack Project Testing Interface
OpenStack Project Testing Interface[1] extabilish a set of
rules to make sure project testing interface looks similarly
between OpenStack projects. This is intended to be
the first change in such direction.

Major improvements are:
- Remove code coverage from unit tests environments
- Reorganize tox.ini to better separate type of envs in sections
- Create an [openstack] section to unify settings for environments
  that would require connecting to OpenStack (functional, scenarion,
  ...)
- Create scenario env to exectute all scenarion tests including
  Neutron ones.
- Point to the new URL for upstream upper hand global requirements file.

Know missing things are:
- Create docs environment
- Create functional environment
- Create cover environment

[1] https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I0129e91b9fd58ac75223c8faca43e690a39061b5
2019-04-24 09:59:39 +02:00
Federico Ressi
13d511e954 Allow pylint to execute paralled processes to speedup execution.
Change-Id: I0a12dba1fc6ab433153ec7766b9beb5c8318c79b
2019-04-11 12:28:55 +02:00
Slawek Kaplonski
31c6f20983 Add reno for release notes management
Change-Id: Iee09083a2c582e086aa64ba1516d36e37e4a8512
2019-04-03 12:58:54 +00:00
Federico Ressi
404e0e2e0b Rewrite floating IP test case
Change-Id: I05cd4bed9082cd9f9b3dfc48233418e1756191d2
2019-04-02 06:58:32 +00:00
Federico Ressi
9b4dadbfa6 Create CentOS Neutron job
Change-Id: I782889abff80eb5ed71910694ccfc165b6c821c9
2019-04-02 06:58:15 +00:00
Federico Ressi
03117a7fb3 Use only pep8, pylint, py36 and py27 as default tox envs
Change-Id: I650233b2f99c3177aaf0003c6e16fe1a08ca9a05
2019-03-26 15:23:08 +01:00
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