]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
tests: change conftest.py to support dynamic markers and test selection
authorAndrew Schoen <aschoen@redhat.com>
Sat, 3 Dec 2016 14:07:09 +0000 (08:07 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 6 Dec 2016 20:56:18 +0000 (14:56 -0600)
commitc02ffdb0e0865585e03f3451d9e347a30ba6e150
treee20d053b9ece7fa92385c795cf10bf81bd0537f3
parent870a4358f0c8bd9cfdfb64e2629e22ea0b1faa77
tests: change conftest.py to support dynamic markers and test selection

This applies correct markers to tests depending on their file path.
Tests that live at the root of tests/functional/tests will be given a
marker of 'all' and apply to any type of ceph node.

Tests that live in tests/functional/tests/mon will get the
'mons' marker and will only run for nodes in the 'mons' group.

Tests that live in tests/functional/tests/osd will get the 'osds'
marker and will only run for nodes in the 'osds' group.

All tests must use the CephNode fixture for this to work and be
parameterized by testinfra.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
tests/conftest.py