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 <gabrioux@redhat.com>
(cherry picked from commit b42250332a)
pull/3678/head
Guillaume Abrioux 2019-03-04 10:01:07 +01:00 committed by mergify[bot]
parent 4dd46ec396
commit 1209fb1874
2 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,6 @@
# These are Python requirements needed to run the functional tests # These are Python requirements needed to run the functional tests
testinfra six==1.10.0
testinfra==1.19.0
pytest-xdist pytest-xdist
pytest==3.6.1 pytest==3.6.1
notario>=0.0.13 notario>=0.0.13

14
tox.ini
View File

@ -68,7 +68,7 @@ commands=
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
" "
# test that the cluster can be redeployed in a healthy state # test that the cluster can be redeployed in a healthy state
testinfra -n 4 --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] [purge-lvm]
commands= commands=
@ -94,7 +94,7 @@ commands=
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
" "
# test that the cluster can be redeployed in a healthy state # test that the cluster can be redeployed in a healthy state
testinfra -n 4 --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 # extra commands for performing a rolling update
# currently this hardcodes the release to kraken # currently this hardcodes the release to kraken
@ -112,7 +112,7 @@ commands=
ceph_docker_image_tag={env:UPDATE_CEPH_DOCKER_IMAGE_TAG:latest-luminous} \ ceph_docker_image_tag={env:UPDATE_CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
" "
bash -c "CEPH_STABLE_RELEASE={env:UPDATE_CEPH_STABLE_RELEASE:luminous} testinfra -n 4 --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] [shrink-mon]
commands= commands=
@ -144,7 +144,7 @@ commands=
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
" "
testinfra -n 4 --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] [add-osds]
commands= commands=
@ -159,7 +159,7 @@ commands=
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \ ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \ ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
" "
testinfra -n 4 --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] [rgw-multisite]
commands= commands=
@ -269,14 +269,14 @@ commands=
# wait 30sec for services to be ready # wait 30sec for services to be ready
sleep 30 sleep 30
# test cluster state using ceph-ansible tests # test cluster state using ceph-ansible tests
testinfra -n 8 --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 # reboot all vms
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml
# wait 30sec for services to be ready # wait 30sec for services to be ready
# retest to ensure cluster came back up correctly after rebooting # retest to ensure cluster came back up correctly after rebooting
testinfra -n 8 --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 # handlers/idempotency test
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} \ ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} \