diff --git a/tests/integration/ha/helpers.py b/tests/integration/ha/helpers.py index 0d0e143..cc5ee04 100644 --- a/tests/integration/ha/helpers.py +++ b/tests/integration/ha/helpers.py @@ -28,12 +28,12 @@ async def existing_app(ops_test: OpsTest) -> str | None: return list(etcd_apps.keys())[0] if etcd_apps else None -def start_continuous_writes(ops_test: OpsTest, endpoints: str, user: str, password: str) -> None: +def start_continuous_writes(ops_test: OpsTest, app_name: str, endpoints: str, user: str, password: str) -> None: model = ops_test.model_full_name # this is the unit where the `etcdctl` command is executed # it does not mean that data is written to this cluster member # before removing the unit used for running `etcdctl`, continuous writes should be stopped - unit = ops_test.model.applications[APP_NAME].units[0].name + unit = ops_test.model.applications[app_name].units[0].name subprocess.Popen( [ "python3", @@ -52,9 +52,9 @@ def stop_continuous_writes() -> None: proc.communicate() -def count_writes(ops_test: OpsTest, endpoints: str, user: str, password: str) -> str: +def count_writes(ops_test: OpsTest, app_name: str, endpoints: str, user: str, password: str) -> str: model = ops_test.model_full_name - unit = ops_test.model.applications[APP_NAME].units[0].name + unit = ops_test.model.applications[app_name].units[0].name key = "cw_key" etcd_command = f"""{SNAP_NAME}.etcdctl \