]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: various fixes in tox.ini
authorGuillaume Abrioux <gabrioux@ibm.com>
Fri, 8 Mar 2024 15:52:29 +0000 (16:52 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 11 Mar 2024 14:48:19 +0000 (15:48 +0100)
- the collection path isn't right
- vagrant_up.sh fails because the path isn't passed down
- increase the number of retries and delay for pytest

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
tox-external_clients.ini
tox-rbdmirror.ini
tox-subset_update.ini
tox-update.ini
tox.ini

index 8981b9ac5ef064fee36fe23f812dadcd4cc502e1..95958cee5656aa3683769ee6a0593ef9edb6c702 100644 (file)
@@ -12,7 +12,7 @@ allowlist_externals =
 passenv=*
 setenv=
   ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
-  ANSIBLE_COLLECTIONS_PATH = {envdir}
+  ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
   ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
   ANSIBLE_CALLBACK_ENABLED = profile_tasks
   ANSIBLE_CACHE_PLUGIN = memory
@@ -32,7 +32,7 @@ deps= -r{toxinidir}/tests/requirements.txt
 changedir={toxinidir}/tests/functional/external_clients{env:CONTAINER_DIR:}
 commands=
   ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
-  bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
+  bash {toxinidir}/tests/scripts/vagrant_up.sh {changedir} --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
 
   ansible-playbook -vv -i {changedir}/inventory {toxinidir}/tests/functional/setup.yml
index 4cd051938660eebcb792760c0d71ae7b538cdaab..d31b8b3ed6004c900ff1aa96047d17a15889067d 100644 (file)
@@ -39,7 +39,7 @@ deps= -r{toxinidir}/tests/requirements.txt
 changedir={toxinidir}/tests/functional/rbdmirror{env:CONTAINER_DIR:}
 commands=
   ansible-galaxy install -r {toxinidir}/requirements.yml -v
-  bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
+  bash {toxinidir}/tests/scripts/vagrant_up.sh {changedir} --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
 
   ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml
@@ -58,7 +58,7 @@ commands=
       ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
   "
 
-  bash -c "cd {changedir}/secondary && bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}"
+  bash -c "cd {changedir}/secondary && bash {toxinidir}/tests/scripts/vagrant_up.sh {changedir}/secondary --no-provision {posargs:--provider=virtualbox}"
   bash -c "cd {changedir}/secondary && bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}/secondary"
   ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/tests/functional/setup.yml
   ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/tests/functional/lvm_setup.yml
index 13f703319c8a9c9ca1b71bc388974c8019ffd2fc..d5c505e6d7939cd6ffcadb94294ecfbe798c474c 100644 (file)
@@ -35,7 +35,7 @@ deps= -r{toxinidir}/tests/requirements.txt
 changedir={toxinidir}/tests/functional/subset_update{env:CONTAINER_DIR:}
 commands=
   ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
-  bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
+  bash {toxinidir}/tests/scripts/vagrant_up.sh {changedir} --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
 
   ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml
index bf56b5f24b1559b5fa7570c1adf7d7a262db41fa..aea0b50cd5316be828be61129452bbac3eed510d 100644 (file)
@@ -34,7 +34,7 @@ setenv=
   ROLLING_UPDATE = True
 changedir={toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
 commands=
-  bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
+  bash {toxinidir}/tests/scripts/vagrant_up.sh {changedir} --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
 
   # use the stable-6.0 branch to deploy a pacific cluster
@@ -83,6 +83,6 @@ commands=
       ceph_docker_registry_password={env:DOCKER_HUB_PASSWORD} \
   "
 
-  bash -c "CEPH_STABLE_RELEASE=quincy py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests"
+  bash -c "CEPH_STABLE_RELEASE=quincy py.test --reruns 30 --reruns-delay 2 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests"
 
   vagrant destroy --force
diff --git a/tox.ini b/tox.ini
index 6721d44fc4570ccaa4d6451096914785728e0e8e..bac66cc5c4e0d26bedfc2998adc8200b94abf401 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -160,7 +160,7 @@ commands=
 
   ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml
 
-  py.test --reruns 5 --reruns-delay 1 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-switch-to-containers --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
+  py.test --reruns 30 --reruns-delay 2 -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-switch-to-containers --ssh-config={changedir}/vagrant_ssh_config {toxinidir}/tests/functional/tests
 
 [add-mons]
 commands=
@@ -274,7 +274,7 @@ setenv=
   ANSIBLE_KEEP_REMOTE_FILES = 1
   ANSIBLE_CACHE_PLUGIN = memory
   ANSIBLE_GATHERING = implicit
-  ANSIBLE_COLLECTIONS_PATH = {envdir}
+  ANSIBLE_COLLECTIONS_PATH = {envdir}/ansible_collections
   # only available for ansible >= 2.5
   ANSIBLE_STDOUT_CALLBACK = yaml
   non_container: DEV_SETUP = True
@@ -331,7 +331,7 @@ commands=
   ansible-galaxy collection install -r {toxinidir}/requirements.yml -v -p {envdir}/ansible_collections
   rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
 
-  bash {toxinidir}/tests/scripts/vagrant_up.sh --no-provision {posargs:--provider=virtualbox}
+  bash {toxinidir}/tests/scripts/vagrant_up.sh {changedir} --no-provision {posargs:--provider=virtualbox}
   bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
 
   # configure lvm, we exclude osd2 given this node uses lvm batch scenario (see corresponding inventory host file)