Skip to content

docs: provide examples in unit testing how-to, and other small improvements#2251

Merged
dwilding merged 5 commits intocanonical:mainfrom
dwilding:unit-testing-howto
Dec 19, 2025
Merged

docs: provide examples in unit testing how-to, and other small improvements#2251
dwilding merged 5 commits intocanonical:mainfrom
dwilding:unit-testing-howto

Conversation

@dwilding
Copy link
Copy Markdown
Contributor

@dwilding dwilding commented Dec 19, 2025

Fixes #2147. The main changes in this PR are:

  • Added an Examples section with links to unit tests for machine and Kubernetes charms.
  • Added a "Run your tests" section that mentions tox -e unit, making the unit testing how-to consistent with the integration testing how-to.

Preview doc

@dwilding dwilding marked this pull request as ready for review December 19, 2025 00:23
@dwilding dwilding requested a review from Copilot December 19, 2025 00:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the unit testing how-to documentation by adding examples and improving consistency with the integration testing guide. The changes make the documentation more actionable and user-friendly.

Key changes:

  • Added an "Examples" section with links to unit tests for both machine and Kubernetes charms
  • Added a "Run your tests" section explaining how to execute tests using tox -e unit
  • Standardized section headings to use imperative mood (e.g., "Set up" instead of "Setting up")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dwilding
Copy link
Copy Markdown
Contributor Author

Should be a quick review, but can wait until January

@dwilding dwilding merged commit 33f0ac5 into canonical:main Dec 19, 2025
57 checks passed
@dwilding dwilding deleted the unit-testing-howto branch December 19, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add detail/examples to "How to write unit tests" doc

4 participants