Skip to content

Commit

Permalink
Merge pull request #20864 from ceph/wip-cv-env-flags-fix
Browse files Browse the repository at this point in the history
ceph-volume tests use granular env vars for vagrant

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
  • Loading branch information
andrewschoen committed Mar 13, 2018
2 parents 5fee268 + 5b6e396 commit 58560cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ changedir=
commands=
git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible

vagrant up {env:VAGRANT_GLOBAL_EXTRA_FLAGS:""} --no-provision {posargs:--provider=virtualbox}
vagrant up {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}

# create logical volumes to test with on the vms
Expand All @@ -58,7 +58,7 @@ commands=
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests

# reboot all vms
vagrant reload {env:VAGRANT_GLOBAL_EXTRA_FLAGS:""} --no-provision
vagrant reload {env:VAGRANT_RELOAD_FLAGS:"--no-provision"}

# retest to ensure cluster came back up correctly after rebooting
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
Expand All @@ -69,4 +69,4 @@ commands=
# retest to ensure cluster came back up correctly
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests

vagrant destroy {env:VAGRANT_GLOBAL_EXTRA_FLAGS:""} --force
vagrant destroy {env:VAGRANT_DESTROY_FLAGS:"--force"}
6 changes: 3 additions & 3 deletions src/ceph-volume/ceph_volume/tests/functional/simple/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ changedir=
commands=
git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible

vagrant up {env:VAGRANT_GLOBAL_EXTRA_FLAGS:""} --no-provision {posargs:--provider=virtualbox}
vagrant up {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}

# use ceph-ansible to deploy a ceph cluster on the vms
Expand All @@ -52,12 +52,12 @@ commands=
ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml

# reboot all vms
vagrant reload {env:VAGRANT_GLOBAL_EXTRA_FLAGS:""} --no-provision
vagrant reload {env:VAGRANT_RELOAD_FLAGS:"--no-provision"}

# wait 2 minutes for services to be ready
sleep 120

# retest to ensure cluster came back up correctly after rebooting
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests

vagrant destroy {env:VAGRANT_GLOBAL_EXTRA_FLAGS:""} --force
vagrant destroy {env:VAGRANT_DESTROY_FLAGS:"--force"}

0 comments on commit 58560cf

Please sign in to comment.