test: Fix shellcheck error SC2164 in tests/integration/molecule.shfor Ansible 2.17

Full error:
ERROR: tests/integration/molecule.sh:54:1: SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

Signed-off-by: Andy Grunwald <andygrunwald@gmail.com>
This commit is contained in:
Andy Grunwald 2024-09-07 15:56:30 +02:00
parent bb84746650
commit becdab3346
No known key found for this signature in database
GPG key ID: 4DF3757FE7EB0B6E

View file

@ -51,5 +51,5 @@ unset _ANSIBLE_COVERAGE_CONFIG
unset ANSIBLE_PYTHON_INTERPRETER
# Run molecule test
cd "$role_root"
cd "$role_root" || { echo "Fail to change directory into $role_root"; exit 1; }
molecule -c "$collection_root/.config/molecule/config.yml" test -s "$scenario"