Commit Graph

119 Commits (978093d843abba4f989ef7f67bcfe68d27ad2ee4)

Author SHA1 Message Date
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
Sébastien Han 6e9da95b33 ci: set replica count to 1 since we have a single osd
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-31 17:39:55 +01:00
Andrew Schoen 20705aa35a tests/journal_collocation: adds testing values to ceph_conf_overrides
This gives test coverage to changes introduced in:

https://github.com/ceph/ceph-ansible/pull/1214

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-26 09:39:42 -06:00
Andrew Schoen a774ea025d tests/xenial_cluster: adds a client node
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-23 09:22:06 -06:00
Sébastien Han 48a8cd1a43 test: add tests for the client role
Here we test the client role.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-20 12:22:18 +01:00
Sébastien Han 2d8ac4a586 docker: only use systemd to manage containers
Prior to this patch we had several ways to runs containers, we could use
ansible's docker module on some distro and on containers distros we were
using systemd. We strongly believe threating containers as services with
systemd is the right approach so this patch generalizes to all the
distros. These days most of the distros are running systemd so it's fair
assumption.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-16 19:37:05 +01:00
Sébastien Han f0687995e1 common: add the name of the ceph conf file in the play
Just for clarity and because we can we now show the name of the
ceph configuration file that is generated.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-15 15:26:01 +01:00
Sébastien Han a8ca0da5ad test: add cluster name support test scenario
We need to test the cluster name support in this CI as well. This
commit might be prone to debate because it tests 2 things in a single
scenario. We first test our ability to deploy a cluster AND the cluster
name support. However it's easier to do it this way and will reduce the
amount of time for testingg. If we don't do this we will have a
duplicate those 2 existing tests into new ones 'only' to test the
cluster name support.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-15 15:26:01 +01: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 ae18b2db65 tests: mark tests with no_docker that fail on containerized deployments
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:19:43 -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 55fee14bd0 tests: adds a docker: true var to the docker_cluster scenario
This lets the CI tests know that this scenario is using docker and
should skip certain tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-07 19:15:29 -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 a184b9a64f tests: test that all osds are listening on the public 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 9b959d10ff tests: adds a comment to the setup.yml playbook for clarification
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen e3521b0830 tests: skip installing net-tools on atomic hosts
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -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 13333d9724 tests: use cluster_name in tests when needed
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:07 -06:00
Andrew Schoen 4effce1c31 tests: use node["conf_path"] instead of hardcoding the path in tests
This also accounts for the cluster having a custom cluster name

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:58:06 -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 73705933c9 tests: with testinfra we don't need scenario.py files anymore
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 1e79bc6726 tests: tests for collocated journals
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 dddfe6d9de tests: ensure ceph-mon is installed on mons
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:20 -06:00
Andrew Schoen 8ed8dfd907 tests: make sure all osds are mounted
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 0665167afa tests: adds some basic tests for OSD nodes
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -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 0e7133cfd0 tests: remove test files that are not used anymore
These tests have been replaced by the ones in test_install.py

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 20f6831f8b tests: test ceph.conf using testinfra modules
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 a31c86c191 tests: tests mon services to ensure they are running correctly
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 4d5a3510e4 tests: include a playbook to install net-tools for socket checks
This playbook could be used in the future to install anything else we
need on these nodes for testing purposes.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -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 b5552239e7 tests: port tests/functional/test_install.py to use testinfra fixtures
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
Andrew Schoen 870a4358f0 tests: use testinfra in tox.ini instead of pytest directly
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen 1574e8f4ab tests: make centos7_cluster use three mons
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 17:27:09 -06:00
Andrew Schoen 155bcf5ae2 tests: rename the directory for centos7_cluster
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:59:27 -06:00
Andrew Schoen 234b2c1cc2 tests: removes unused xenial_conf_tests and xenial_mon_osd scenarios
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:56:06 -06:00
Andrew Schoen da6d68c042 tests: rename the directory for xenial_cluster
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:49:40 -06:00
Andrew Schoen 5b9cb48774 tests: add 2 more mons to xenial_cluster
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:46:05 -06:00
Andrew Schoen 9f887f6064 tests: remove unused group_vars/osds from docker_cluster
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 14:50:21 -06:00
Andrew Schoen de711f2996 tests: docker_cluster does not need os_tuning_params
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 14:49:31 -06:00