From dc9788c5fa1d491380b0a1f2565ef7548cc27d98 Mon Sep 17 00:00:00 2001 From: Robert Gildein Date: Wed, 6 Mar 2024 09:10:57 +0100 Subject: [PATCH] Revert "fix zaza.model.run_on_unit (#257)" This reverts commit 4eaacf2416687f0fb8a5fb174ea4aba2edef814b. --- tests/functional/tests/model.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/functional/tests/model.py b/tests/functional/tests/model.py index 7bca3373..5f5d4d69 100644 --- a/tests/functional/tests/model.py +++ b/tests/functional/tests/model.py @@ -58,8 +58,7 @@ def test_scp_from_unit(self): test_file = "test.txt" path = f"/tmp/{test_file}" exp_path = os.path.join(tmp_dir, test_file) - zaza.sync_wrapper(self.model.connect)() - zaza.sync_wrapper(self.model._model.units[TESTED_UNIT].run)(f"echo 'test' > {path}") + zaza.model.run_on_unit(unit_name=TESTED_UNIT, command=f"echo 'test' > {path}") zaza.sync_wrapper(self.model.scp_from_unit)(TESTED_UNIT, path, tmp_dir) self.assertTrue(os.path.exists(exp_path))