Describe the bug
The load_config function uses relative paths and so running pytest from the root directory does not pick up VM configs while running it from the tests folder does.
To Reproduce
git clone the repo
Install dependecies with pip install -r requirements-tests.txt
go to the tests directory with cd tests/
link the vagrant config files (i.e. ln -s nagios_config.json.vagrant nagios_config.json)
Run pytest: It will pick up tests and tries to execute them, i.e. the tests for Nagios
Move to the project root - cd ..
Run pytest again: it will now skip the tests it attempted to run previously.
Expected behavior
There is no difference if I run this inside the tests folder or not.
Also the pytest config for being inside the folder tests/ and being in the project root are different.
This leads to not always having the same test results.
Describe the bug The
load_config
function uses relative paths and so running pytest from the root directory does not pick up VM configs while running it from the tests folder does.To Reproduce
pip install -r requirements-tests.txt
tests
directory withcd tests/
ln -s nagios_config.json.vagrant nagios_config.json
)pytest
: It will pick up tests and tries to execute them, i.e. the tests for Nagioscd ..
pytest
again: it will now skip the tests it attempted to run previously.Expected behavior There is no difference if I run this inside the
tests
folder or not.