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

Fixing the function signature of send_signal in _TestingPebbleClient #926

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

weiiwang01
Copy link
Contributor

This pull request addresses the issue of incorrect function signature in the send_signal method of the mocking class _TestingPebbleClient in the operator framework. Currently, the signature of send_signal method in _TestingPebbleClient does not match the send_signal method of Client in the ops.pebble module. As a result, unit tests that involve the send_signal method are failing.

Here's the function signature of send_signal in ops.testing._TestingPebbleClient right now :

def send_signal(self, sig: Union[int, str], *service_names: str):

And here's the send_signal method of ops.pebble.Client:

def send_signal(self, sig: Union[int, str], services: Iterable[str]):

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.

Thanks for this fix!

@benhoyt
Copy link
Collaborator

benhoyt commented Apr 24, 2023

@weiiwang01 Out of interest, how did you notice this discrepancy?

@benhoyt benhoyt merged commit 734e12d into canonical:main Apr 24, 2023
@weiiwang01
Copy link
Contributor Author

@weiiwang01 Out of interest, how did you notice this discrepancy?

I encountered an issue when running a unit test case that involved send_signal, an exception was raised.

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