]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: adds a purge_cluster_collocated scenario 1215/head
authorAndrew Schoen <aschoen@redhat.com>
Thu, 22 Dec 2016 20:13:08 +0000 (14:13 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 3 Jan 2017 21:57:17 +0000 (15:57 -0600)
This scenario brings up a 1 mon 1 osd cluster using journal collocation,
purges the cluster and then verifies it can redeploy the cluster.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
tox.ini

diff --git a/tox.ini b/tox.ini
index 23bd67ecbe4ed4100bb790f66d9d34747a6afca3..1e42b467f9b5dffbc529387fcadc090eaa1bc5b4 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = {ansible2.2}-{xenial_cluster,journal_collocation,centos7_cluster,dmcrypt_journal,dmcrypt_journal_collocation,docker_cluster}
+envlist = {ansible2.2}-{xenial_cluster,journal_collocation,centos7_cluster,dmcrypt_journal,dmcrypt_journal_collocation,docker_cluster,purge_cluster_collocated}
 skipsdist = True
 
 [testenv]
@@ -31,6 +31,8 @@ changedir=
   centos7_cluster: {toxinidir}/tests/functional/centos/7/cluster
   # tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker
   docker_cluster: {toxinidir}/tests/functional/centos/7/docker-cluster
+  # creates a cluster, purges the cluster and then brings the cluster back up
+  purge_cluster_collocated: {toxinidir}/tests/functional/centos/7/journal-collocation
 commands=
   vagrant up --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
@@ -39,4 +41,11 @@ commands=
   ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml
 
   testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
+
+  # use infrastructure-playbooks/purge-cluster.yml to purge the cluster
+  purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/infrastructure-playbooks/purge-cluster.yml --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch"
+  # set up the cluster again
+  purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars="fetch_directory={changedir}/fetch"
+  # test that the cluster can be redeployed in a healthy state
+  purge_cluster_collocated: testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
   vagrant destroy --force