You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
okin
added a commit
to okin/katprep
that referenced
this issue
Apr 1, 2021
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.The text was updated successfully, but these errors were encountered: