Open oliver-sanders opened 2 years ago
This is due to the unit tests picking up your global config. IMO they ought not to?
Yes, the tests should not be picking up the global config (fix export CYLC_CONF_PATH=
).
No, tests should not be installing workflows at arbitrary locations like this. They should use the pattern of the functional and integration tests to store these resources in a test hierarchy.
No, tests should not be installing workflows at arbitrary locations like this. They should use the pattern of the functional and integration tests to store these resources in a test hierarchy.
Not sure I understand? The tests are installing workflows in TMPDIR to avoid polluting ~/cylc-run
, what's wrong with that?
The functional and integration tests are careful to install workflows into a hierarchy which is easily visible for debugging, properly managed (e.g. in the event of test failure) and doesn't require any form of mocking to make work.
I'm not sure I see any gain from keeping the run dirs behind after the tests even if they failed. As these are unit tests the only useful information is from the assertion failed message or traceback if the tests errored. By using TMPDIR we don't have to do any cleanup ourselves.
Two of the unit tests are flaky:
This is because of interaction with symlink dirs:
The unit tests should not be creating workflows in the
cylc-run
directory directly. If needed they should be installed into a test hierarchy as the integration and functional tests are.Perhaps these tests might be more appropriate as integration tests?
Pull requests welcome!