We do not seem to have any tests for our custom django commands.
I’m trying to write one for the plugin removal.
The test needs to be able to call commands, stop/start pulp services, trigger typical workflows like sync/publish/distribute.
It looks more like a functional test but because it’s a command, it should be run next to the Django and can’t be run on a separate box. We have unit tests which run this way but semantically it’s not a unit test.
Does it need to be a separate category of tests?
In order to control services, pulp smash and its config should be available in the container with Django installation (currently it’s only installed in the box with functional tests in CI if I’m not mistaken). Or should it be just a custom exec (which will differ for local test and CI) but it sounds like a hack?
Thoughts are appreciated, +1 or any alternative approach is welcome.