ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

config and test setup tweaks (test main()'s, MAZER_HOME, stop using ~/.ansible defaults in tests, etc) #223

Closed alikins closed 5 years ago

alikins commented 5 years ago
SUMMARY

This is a set of changes mostly focused around on making it easier to test mazer.

This includes some config tweaks to let the configs be injected by tests or overridden by env VARS

One motivation for this is that tox doesn't change $HOME or the current user so all the code that uses ~/.ansible based paths (config, logging config, etc) ends up being used by unit tests. If config or logging config do something (like use a custom log handler) the tox tests can fail because the python modules with the custom logger dont exist in the tox roots.

ISSUE TYPE
MAZER VERSION
name = mazer
version = 0.4.0
config_file = /home/adrian/.ansible/mazer.yml
uname = Linux, newswoop, 5.0.5-200.fc29.x86_64, #1 SMP Wed Mar 27 20:58:04 UTC 2019, x86_64
executable_location = /home/adrian/venvs/galaxy-cli-py27/bin/mazer
python_version = 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
python_executable = /home/adrian/venvs/galaxy-cli-py27/bin/python