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

chore: adjust for the Scenario 7.0 API #21

Merged
merged 8 commits into from
Sep 18, 2024

Conversation

tonyandrewmeyer
Copy link
Collaborator

@tonyandrewmeyer tonyandrewmeyer commented Sep 3, 2024

Updates the code to align with the Scenario 7.0 API changes - mostly the location of some imports and using sets in the e2e tests, but also handling the str to _Event conversion slightly differently.

This does expose _Event as an option to run even though it's now private. It seems like that's ok, and leaving the ability to use the string names here is most compatible. It is possible to do CharmEvents.relation_changed(my_relation) and so on (or scenario.on.relation_changed(my_relation) if we make that change in Scenario) if people need to customise the events or don't want to do string names.

@tonyandrewmeyer tonyandrewmeyer marked this pull request as ready for review September 9, 2024 08:23
@tonyandrewmeyer
Copy link
Collaborator Author

tonyandrewmeyer commented Sep 12, 2024

@PietroPasotti could you please give this a review when you have some time? This blocks a few charms from upgrading to Scenario 7, so would be good to get out of the way. Let me know if you'd rather I took a different approach. Thanks!

Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

lgtm!

interface_tester/interface_test.py Outdated Show resolved Hide resolved
interface_tester/interface_test.py Outdated Show resolved Hide resolved
interface_tester/interface_test.py Outdated Show resolved Hide resolved
@tonyandrewmeyer
Copy link
Collaborator Author

@PietroPasotti are you ok with this as it is now?

Copy link
Collaborator

@PietroPasotti PietroPasotti left a comment

Choose a reason for hiding this comment

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

yes! thanks

@tonyandrewmeyer
Copy link
Collaborator Author

yes! thanks

Could you merge it for me, please?

@PietroPasotti PietroPasotti merged commit 443060f into canonical:main Sep 18, 2024
2 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the scenario-7 branch September 18, 2024 22:34
IronCore864 added a commit to IronCore864/pytest-interface-tester that referenced this pull request Sep 25, 2024
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.

2 participants