Skip to content

Commit

Permalink
tests: various fixes in tox.ini
Browse files Browse the repository at this point in the history
- the collection path isn't right
- vagrant_up.sh fails because the path isn't passed down

Signed-off-by: Guillaume Abrioux <[email protected]>
  • Loading branch information
guits committed Mar 10, 2024
1 parent 363fdb2 commit ee8bb68
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tox-external_clients.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tox-rbdmirror.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tox-subset_update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tox-update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ee8bb68

Please sign in to comment.