-
Notifications
You must be signed in to change notification settings - Fork 9
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 context #171
Comments
This is just spitballing here, but what if the side-effects were only available when you ran the event with the context manager, so all of those attributes moved from It's more of a hassle to use them but it does feel like a more natural fit to me, and most tests shouldn't need to access any of them - two main exceptions being action tests, most of which I assume do want to check the results, and secret-remove events, most of which should be checking that the expected revision was removed. |
I like this suggestion. It also has the benefit of reinforcing the principle that scenario is chiefly a black-box testing thing. If you want to peer into the box, you have to take an extra step. |
Of course, an issue now is that we're promising that the version will stay at 7.x for a while, and they couldn't be removed from I do still think this would be worth doing, though. They could be added to |
Moved to canonical/operator#1422 |
The context has a bunch of "this is the context the event runs in":
But there's also a lot of side-effects, which have grown noticeably in 7.x:
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.The text was updated successfully, but these errors were encountered: