Unit tests
We are in the process of making unit tests a standard part of development. As such, prior to PR uploads, the developer is responsible for writing unit tests that reflect the introduced changes with a set PR, and checking that all PRs pass the required tests. The developer should use the existing unit tests as a template - individual functionality should be abstracted away
There are a set of categories of unit tests, that we have separated out with markers. The unit tests that do not have markers are run by default when using pytest in the root of the drunc repository.
Running the tests with the markers operates as follows:
-
pytest --test-grpc- runs all the unmarked unit tests, and all tests markedgrpc. These have been separated as these tests take a while -
pytest --test-paramiko- runs all the unmarked unit tests, and all tests markedparamiko. These have been separated as thy depend on the installation mode, and will automatically fail if theparamiko[gssapi]repo has not beenpip installed. -
pytest --test-grpc --test-paramiko- runs all the unmarked unit tests, and all tests marked with eithergrpcorparamiko. This shows that the markers can be combined. -
pytest --test-all- run all tests regardless of their marker.
It is expected that in any other cases where new markers are introduced, they are documented here.
Regression tests
With the development of multiple process managers and use of various parts systems depending on the congfiguration, there will be a set of integration tests purely focused on the various methods in which the drunc infrastructure can work. These will be run in a separate integtest repo. To run them, you will run