Skip to content

Add unit tests for custom charm functionality#131

Closed
tonyandrewmeyer wants to merge 1 commit intocanonical:mainfrom
tonyandrewmeyer:add-unit-tests
Closed

Add unit tests for custom charm functionality#131
tonyandrewmeyer wants to merge 1 commit intocanonical:mainfrom
tonyandrewmeyer:add-unit-tests

Conversation

@tonyandrewmeyer
Copy link

Summary

  • Add unit tests for custom charm code using ops.testing (Scenario)
  • Uses the new charmcraft extension autoloading from feat: ops.testing autoload support for charmcraft extensions operator#2367 to correctly resolve metadata from extensions (e.g. flask-framework, django-framework)
  • Tests only cover custom functionality added on top of the paas-charm base, not the base framework itself

Test plan

  • Run python -m pytest tests/unit/test_charm.py -v with ops[testing] installed from the operator PR branch

🤖 Generated with Claude Code

Use ops.testing (Scenario) with the new charmcraft extension autoloading
from canonical/operator#2367 to test the charm's custom code on top of
the paas-charm base.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tonyandrewmeyer
Copy link
Author

Sorry, I meant to open this against my fork and did it here by mistake.

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.

1 participant