From 6eda1a5ad545836949fd0f3ff1ec9ce460ebf129 Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Tue, 18 Oct 2022 10:24:56 -0400 Subject: [PATCH] change upgrade-charm to use the juju cli --- zaza/charm_tests/lifecycle/tests.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zaza/charm_tests/lifecycle/tests.py b/zaza/charm_tests/lifecycle/tests.py index 20306cc9d..a7ec249b9 100644 --- a/zaza/charm_tests/lifecycle/tests.py +++ b/zaza/charm_tests/lifecycle/tests.py @@ -19,7 +19,7 @@ import logging import os -import zaza.model as model +import subprocess class UpgradeCharmsToPath(object): @@ -41,5 +41,9 @@ def run(self, charms): for charm in charms: charm_path = cwd + '/' + charm + '.charm' logging.debug("Upgrading {} to {}".format(charm, charm_path)) - model.upgrade_charm(charm, path=charm_path) + subprocess.check_call([ + 'juju', 'upgrade-charm', + '--path', str(charm_path), + str(charm) + ]) return True