]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: add the ability to run tests with shaman repos
authorAndrew Schoen <aschoen@redhat.com>
Wed, 15 Mar 2017 20:01:32 +0000 (15:01 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 15 Mar 2017 21:37:20 +0000 (16:37 -0500)
To run tests that deploy shaman repos set CEPH_DEV=true and optionally
use CEPH_DEV_BRANCH and CEPH_DEV_SHA1 to define with branch and sha1 to
test. CEPH_DEV_BRANCH defaults to master and CEPH_DEV_SHA1 defaults to
latest.

For example, this would run the journal_collocation test with the latest
build of the master branch:

  CEPH_DEV=true tox -rve ansible2.2-journal_collocation

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

diff --git a/tox.ini b/tox.ini
index 561dc05f4837d1908d08055664d0ed4336b79e62..bad1fae041377e92bd254990ef7742e2b2641fef 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -10,10 +10,10 @@ skipsdist = True
 commands=
   cp {toxinidir}/infrastructure-playbooks/purge-cluster.yml {toxinidir}/purge-cluster.yml
   ansible-playbook -vv -i {changedir}/hosts {toxinidir}/purge-cluster.yml \
-      --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream}"
+      --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream} ceph_dev={env:CEPH_DEV:false} ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}"
   # set up the cluster again
   ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample \
-      --extra-vars="fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream}"
+      --extra-vars="fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream} ceph_dev={env:CEPH_DEV:false} ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}"
   # test that the cluster can be redeployed in a healthy state
   testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
 
@@ -24,7 +24,7 @@ commands=
 commands=
   cp {toxinidir}/infrastructure-playbooks/rolling_update.yml {toxinidir}/rolling_update.yml
   ansible-playbook -vv -i {changedir}/hosts {toxinidir}/rolling_update.yml \
-      --extra-vars="ceph_stable_release=kraken ireallymeanit=yes fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream}"
+      --extra-vars="ceph_stable_release=kraken ireallymeanit=yes fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream} ceph_dev={env:CEPH_DEV:false} ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest}"
 
   testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
 
@@ -72,7 +72,7 @@ commands=
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
 
   ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} \
-      --extra-vars="fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream}"
+      --extra-vars="fetch_directory={changedir}/fetch ceph_rhcs={env:USE_CEPH_RHCS:false} ceph_origin={env:CEPH_ORIGIN:upstream} ceph_dev={env:CEPH_DEV:false} ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}"
   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