From: Guillaume Abrioux Date: Mon, 4 Mar 2019 09:01:07 +0000 (+0100) Subject: tests: pin testinfra version X-Git-Tag: v4.0.0rc1~57 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b42250332a0c9afadcb5a670cc7153d72fd8daec;p=ceph-ansible.git tests: pin testinfra version As of testinfra 2.0.0, the binary name is `py.test`. But let's pin the version to 1.19.0. Indeed, migrating to 2.0.0 requires our current testing to be reworked a bit. Since we don't have the bandwidth ATM for this, it's better to simply keep testing with testinfra 1.19.0. Note that I've replaced all `testinfra` occurences by `py.test` anyway. Signed-off-by: Guillaume Abrioux --- diff --git a/tests/requirements.txt b/tests/requirements.txt index af4674c3f..72f6a8f8d 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,6 @@ # These are Python requirements needed to run the functional tests six==1.10.0 -testinfra +testinfra==1.19.0 pytest-xdist pytest==3.6.1 notario>=0.0.13 diff --git a/tox.ini b/tox.ini index 6498fc82c..1e10a460e 100644 --- a/tox.ini +++ b/tox.ini @@ -71,7 +71,7 @@ commands= ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \ " # test that the cluster can be redeployed in a healthy state - testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests + py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests [purge-lvm] commands= @@ -99,7 +99,7 @@ commands= ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \ " # test that the cluster can be redeployed in a healthy state - testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests + py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests # extra commands for performing a rolling update [update] @@ -116,7 +116,7 @@ commands= ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest} \ " - bash -c "CEPH_STABLE_RELEASE={env:UPDATE_CEPH_STABLE_RELEASE:nautilus} testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests" + bash -c "CEPH_STABLE_RELEASE={env:UPDATE_CEPH_STABLE_RELEASE:nautilus} py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests" [shrink-mon] commands= @@ -150,7 +150,7 @@ commands= ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \ " - testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-switch-to-containers {toxinidir}/tests/functional/tests + py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-switch-to-containers {toxinidir}/tests/functional/tests [add-osds] commands= @@ -167,7 +167,7 @@ commands= ceph_dev_branch={env:CEPH_DEV_BRANCH:master} \ ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \ " - testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 {toxinidir}/tests/functional/tests + py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 {toxinidir}/tests/functional/tests [rgw-multisite] commands= @@ -312,14 +312,14 @@ commands= # wait 30sec for services to be ready sleep 30 # test cluster state using ceph-ansible tests - testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests + py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests # reboot all vms ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml # wait 30sec for services to be ready # retest to ensure cluster came back up correctly after rebooting - testinfra -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests + py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests # handlers/idempotency test ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} \