Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: model error on testing module if invalid status set by charm #1107

Merged
merged 7 commits into from
Jan 11, 2024

Conversation

yanksyoon
Copy link
Contributor

This small enhancement:

  1. documents that ErrorStatus and UnknownStatus is for read-only.
  2. raises an ops.ModelError, which is the same behavior on real juju backend.

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Great, thanks for the PR. A couple of suggestions for simplifying.

ops/model.py Outdated Show resolved Hide resolved
ops/model.py Show resolved Hide resolved
ops/testing.py Outdated Show resolved Hide resolved
ops/testing.py Outdated Show resolved Hide resolved
ops/testing.py Outdated Show resolved Hide resolved
test/test_testing.py Show resolved Hide resolved
Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks!

Copy link
Contributor

@tonyandrewmeyer tonyandrewmeyer left a comment

Choose a reason for hiding this comment

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

LGTM!

@benhoyt benhoyt merged commit ea1cf19 into canonical:main Jan 11, 2024
18 checks passed
@benhoyt
Copy link
Collaborator

benhoyt commented Jan 11, 2024

Thanks for the contribution @yanksyoon!

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.

3 participants