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

DPE-904 Fixing Juju SDK warning: SIMULATE_CAN_CONNECT=True #15

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

taurus-forever
Copy link
Contributor

Issue

It is a side effect fix in DPE-904 to address annoying warning.

Solution

Use SIMULATE_CAN_CONNECT=True as recommended by Juju SDK.

Context

Just a warning fix, should have no other effect.

Release Notes

Juju testing SDK: use SIMULATE_CAN_CONNECT=True for better connection tracking.

Testing

Just a warning fix, should have no other effect.

@taurus-forever taurus-forever force-pushed the alutay/fix-warning-SIMULATE_CAN_CONNECT branch from 6e67a56 to 299d32d Compare December 6, 2022 12:54
Copy link
Collaborator

@paulomach paulomach left a comment

Choose a reason for hiding this comment

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

lgtm

tox.ini Outdated Show resolved Hide resolved
> ========================= warnings summary ================
> ...
> tests/unit/test_charm.py::TestCharm::test_on_leader_elected_create_exception
> tests/unit/test_charm.py::TestCharm::test_on_leader_elected_create_existing_service
> tests/unit/test_charm.py::TestCharm::test_on_peer_relation_created
> tests/unit/test_charm.py::TestCharm::test_on_peer_relation_created_delete_exception
> tests/unit/test_charm.py::TestCharm::test_on_peer_relation_created_delete_nothing
>   /home/taurus/canonical/mysql-router-k8s-operator/.tox/unit/lib/python3.10/site-packages/ops/testing.py:190:
> UserWarning: Please set ops.testing.SIMULATE_CAN_CONNECT=True.
> See https://juju.is/docs/sdk/testing#heading--simulate-can-connect for details.
>     warnings.warn(
>
> -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
@taurus-forever taurus-forever force-pushed the alutay/fix-warning-SIMULATE_CAN_CONNECT branch from 76d19d3 to e72ccaf Compare January 3, 2023 13:39
@taurus-forever taurus-forever merged commit d7dc190 into main Jan 3, 2023
@taurus-forever taurus-forever deleted the alutay/fix-warning-SIMULATE_CAN_CONNECT branch January 3, 2023 14:35
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.

4 participants