Fix tests failing when installation process tests are run via cdds account - #1042
Fix tests failing when installation process tests are run via cdds account#1042Ed (mo-gill) wants to merge 4 commits into
Conversation
|
Commit f0aafc8 resolves: It was caused by the discrepancy in vs the way its set in the installation process: |
|
Commit 235ba3d fixes all the errors involving configparser e.g.: Turned out it was because at the point of running the tests in the installation, $CDDS_DIR isn't set. I think usually it's set in setup_env_for_devel which isn't run as part of the installation process. The addition of the setting of that variable via a pytest fixture will hopefully avoid that in future and it does fix those errors. |
|
Commit b0ea0a0 fixed these errors caused by hardcoded paths. and |
|
Commit 39d843a fixed the hardcoded paths so that were causing these failures: and |
| from cdds.common.request.request import Request | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) |
There was a problem hiding this comment.
More on autouse here, as i can't see it used elsewhere in CDDS. Seems like a handy way to ensure it's always used by tests rather than having to explicitly request it.
|
These tests that are supposed to be run during installation now pass: If anyone wants to test it i've left two dirs in the cdds home:
I'll clean all that out once this has been merged. I've also run the unit tests on my own space and everything is passing there as well. Copilot was used during development. |
Fixes #1038