Skip to content
New issue

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

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

Already on GitHub? # to your account

Make mocked status_set raise an error for 'error' or 'unknown' statuses #202

Closed
benhoyt opened this issue Sep 23, 2024 · 1 comment · Fixed by canonical/operator#1417
Closed
Labels

Comments

@benhoyt
Copy link
Collaborator

benhoyt commented Sep 23, 2024

Harness's mocked status_set raises an exception if it's not one of the allowed statuses. We should do this in Scenario too. See related thread.

@tonyandrewmeyer
Copy link
Collaborator

Opened a PR in operator.

@tonyandrewmeyer tonyandrewmeyer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
tonyandrewmeyer added a commit to canonical/operator that referenced this issue Oct 11, 2024
This copies across the fix from Harness to also be present in Scenario:
if `status_set` is passed anything other than the valid statuses, then
`ModelError` is raised (to better mimic what the Juju hook would
actually do).

Closes canonical/ops-scenario#202 (rather than
copying it over to this repo).

---------

Co-authored-by: Ben Hoyt <benhoyt@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants