operator
operator copied to clipboard
Add detail/examples to "How to write unit tests" doc
Based on feedback internally, we should cover a couple more things in How to write unit tests for a charm:
-
What might a test look like for a machine charm? The doc already has an example of how to verify that config was written in a container. We could add a similar example for a machine charm, mocking pathops/pathlib functions as needed.
-
Mention how to run unit tests. The doc doesn't mention
tox -e unitanywhere. Even though the doc is about writing tests, people expect to find out how to run tests too. How to write integration tests for a charm has a section called "Run your tests", which I think is good.