Use pytest base temp dir to write test logs
With e2938732, compose logs are dumped in case of errors during the test.
While this is nice, the tests are currently written to
docker/tests/logs
directory, with files having a random identifier.
This means they require manual cleaning and it is hard to know which one is the most recent. This problem can be solved by using the tmp_path_factory fixture which allow us to create a subdirectory in pytest base temporary directory.
The logs are now accessible through the managed
-current
symlink, like follows:
/tmp/pytest-of-lunar/pytest-current/docker/test_alter.logs