Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden smoketest to avoid ansible becoming a python dependency #2926

Merged
merged 1 commit into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tools/smoketest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

ANSIBLE=$(pipdeptree --reverse -p ansible)

if [ -z "$ANSIBLE" ]; then
echo "Ansible dependency not detected."
else
echo "FATAL: Detected unexpected dependency on Ansible package"
echo "$ANSIBLE"
exit 2
fi
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
minversion = 3.9.0
minversion = 3.18.0
envlist =
lint
docs
Expand Down Expand Up @@ -34,7 +34,6 @@ passenv =
TERM
setenv =
ANSIBLE_CONFIG={toxinidir}/.ansible.cfg
ANSIBLE_CALLABLE_WHITELIST={env:ANSIBLE_CALLABLE_WHITELIST:timer,profile_roles}
ANSIBLE_DISPLAY_FAILED_STDERR=1
ANSIBLE_VERBOSITY=1
MOLECULE_NO_LOG=0
Expand Down Expand Up @@ -68,8 +67,7 @@ commands =
# html report is used by Zuul CI to display reports
python -m pytest lib/molecule/test/unit/ {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs}


whitelist_externals =
allowlist_externals =
find
rm
sh
Expand Down Expand Up @@ -143,7 +141,7 @@ deps =
commands_pre =
commands =
python ./tools/build-containers.py
whitelist_externals =
allowlist_externals =
sh

[testenv:packaging]
Expand Down Expand Up @@ -201,4 +199,6 @@ commands =
pipdeptree --reverse -e pip,pbr,six,setuptools,toml,urllib3
molecule --version
molecule drivers
# add `molecule doctor` once we implemnt it
bash ./tools/smoketest.sh
allowlist_externals =
bash