We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently my method for testing leadership change is:
https://github.com/canonical/alertmanager-k8s-operator/blob/main/tests/integration/test_rescale_charm.py
Is there a better way?
while True: logger.info("deploy charm") await ops_test.model.deploy( charm_under_test, application_name=app_name, resources=resources, num_units=10 ) await block_until_leader_elected(ops_test, app_name) if await get_leader_unit_num(ops_test, app_name) > 0: break # we're unlucky: unit/0 is the leader, which means no scale down could trigger a # leadership change event - repeat logger.info("Elected leader is unit/0 - resetting and repeating") await ops_test.model.applications[app_name].remove() await ops_test.model.block_until(lambda: len(ops_test.model.applications) == 0) await ops_test.model.reset()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently my method for testing leadership change is:
https://github.com/canonical/alertmanager-k8s-operator/blob/main/tests/integration/test_rescale_charm.py
Is there a better way?
The text was updated successfully, but these errors were encountered: