From eee28a68f3b81c209802dbb2fba97e276d016c71 Mon Sep 17 00:00:00 2001 From: Benjamin Schimke Date: Fri, 20 Dec 2024 15:52:51 +0100 Subject: [PATCH] Exec on instance --- tests/integration/tests/test_util/harness/lxd.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/tests/test_util/harness/lxd.py b/tests/integration/tests/test_util/harness/lxd.py index 6ce420de8..3d17dc9f2 100644 --- a/tests/integration/tests/test_util/harness/lxd.py +++ b/tests/integration/tests/test_util/harness/lxd.py @@ -131,8 +131,9 @@ def new_instance(self, network_type: str = "IPv4") -> Instance: except subprocess.CalledProcessError as e: raise HarnessError(f"Failed to create LXD container {instance_id}") from e - stubbornly(retries=3, delay_s=5).exec(["snap", "wait", "system", "seed.loaded"]) - return Instance(self, instance_id) + instance = Instance(self, instance_id) + stubbornly(retries=3, delay_s=5).on(instance).exec(["snap", "wait", "system", "seed.loaded"]) + return instance def _configure_profile(self, profile_name: str, profile_config: str): LOG.debug("Checking for LXD profile %s", profile_name)