Commit Graph

70 Commits (5a136889795ee46f8fbee7c95ba7fd8ce0b12bdf)

Author SHA1 Message Date
Sébastien Han c37aaa41f4 playbook: homogenize the way list osd ids
Problem: too many different commands to do the same thing. The 'cut'
command on infrastructure-playbooks/purge-cluster.yml was also wrong.
This sed command from osixia in ceph-docker
https://github.com/ceph/ceph-docker/pull/580/ addresses all the
scenarios.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-03-30 11:51:38 +02:00
Andrew Schoen d02f14a329 tests: if no osds are created do not error in conftest.py
If no OSDs were created the command would fail and because we were using
check_output it would throw an exception and mark all OSD tests as ERROR.
This keeps tests from running that might tell us why the OSDS were not created.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-02-02 12:39:06 -06:00
Andrew Schoen 6baf2192cd tests: adds an osds parameter to the node fixture
The osds are named differently for systemd in containerized deployments
so this new parameter is used to make that change transparent in the
tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:27:42 -06:00
Andrew Schoen 239b0d0f96 tests: adds a docker property to the node fixture
This is used to skip tests that will not work with containerized
deployment or atomic hosts.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:17:09 -06:00
Andrew Schoen 26a0e8a084 tests: account for multiple osd hosts when testing if all are up and in
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 14:31:31 -06:00
Andrew Schoen f5fb924189 tests: ensure all osds are listening on the cluster network
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 10:36:07 -06:00
Andrew Schoen e2ffd66ca8 tests: add num_devices to node fixture
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 10:36:06 -06:00
Andrew Schoen 4323607c2e tests: dmcrypt_journal_collocation should run journal collocation tests
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen 4e3eb7b627 tests: add cluster_name and conf_path to the node fixture
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:05 -06:00
Andrew Schoen 2464b69612 tests: include the number of mons as a attribute on node
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:57:20 -06:00
Andrew Schoen 1abbc948d9 tests: update skip messages in conftest.py
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen d79188c8b6 tests: rename vars to ansible_vars in conftest.node
This is to avoid redefining the builtin vars()

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 5f81638b5e tests: rename CephNode to node and add a bit of documentation
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 1b3aca44d7 tests: add a journal_collocation tag to collocated journal tests
The test will be skipped if journal_collocation is not True in the
group_vars for the scenario.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen e13da73a5e testing: CephNode should return osd_ids
This is an empty list on anything but an OSD node. These ids will be
used for further OSD testing.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 4810b38ece tests: ensure tests marked with 'all' run on every node
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen cd9b47ceb8 tests: the CephNode fixture should provide the cluster subnet
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 05be43c546 tests: return address and ansible vars from CephNode
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen c02ffdb0e0 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>
2016-12-06 14:56:18 -06:00
Alfredo Deza 05dace442d tests: create the conftest file that does all the magic
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: pytest#harness
2016-11-04 13:59:33 -04:00