Hello everyone!
I have been building some workflows and I was trying to make use of the pytest fixtures provided in aiida-core to run them.
I took a look at how it is done in the aiida-core repo and in the aiida-vasp repo and I basically adapted my tests to follow the same procedure, i.e. import the fixtures, create a mock code to retrieve the reference data and then perform your usual assertion tests in your script.
However, I noticed that for example pgtest does not play nicely with the gitlab docker containers where the CI is ran. In those containers one is technically the root user, which means that when one invokes the pytest fixture to create a temporary db using `create_db_cluster` pgtest will fail as `OSError: b'pg_ctl: cannot be run as root`.
One can get around this by running the pytest command as the prosgres user (not the cleanest solution) like this
su -p -c "pytest -q tests/relaxation/test.py" postgres
However, then the fixture fails when it tries to create the configuration directory
aiida.common.exceptions.ConfigurationError: could not create the '/root/.aiida' configuration directory
So I was wondering if somebody else has had these issues when trying to run tests in Gitlab.
Thank you very much for your help
Cheers