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

Separate the 'context' and 'side effects' aspects of the testing context #1422

Open
tonyandrewmeyer opened this issue Oct 10, 2024 · 0 comments
Labels
testing Related to ops.testing

Comments

@tonyandrewmeyer
Copy link
Contributor

The context has a bunch of "this is the context the event runs in":

  • charm_spec
  • charm_root (in terms of what's there when the event starts - anything the charm writes to it is more state)
  • juju_version
  • app_trusted

But there's also a lot of side-effects, which have grown noticeably in 7.x:

  • juju_log
  • app_status_history
  • unit_status_history
  • workload_version_history
  • requested_storages
  • exec_history (TBC)
  • removed_secret_revisions
  • emitted_events
  • action_logs
  • action_results

I feel like it would be cleaner if Context was more cleanly just the context (plus config, like the settings for capturing events), and the side effects were available some other way.

Moved from canonical/ops-scenario#171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to ops.testing
Projects
None yet
Development

No branches or pull requests

2 participants