From 6bedf18f5fbabf4da853aa3fa70285ac2072fbc8 Mon Sep 17 00:00:00 2001 From: Guillaume Fouillet Date: Tue, 17 Dec 2024 09:38:56 +0100 Subject: [PATCH] fix(dependencies): install charmcraft if missing in test-runner script Ensure charmcraft is installed before running integration tests, similar to how jq is handled. This should fix several red test in JUJU gating ci : * tests/suites/deploy * tests/suites/hooks * tests/suites/relations * tests/suites/sidecar * tests/suites/spaces_ec2 * tests/suites/storage --- jobs/ci-run/integration/common/test-runner.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jobs/ci-run/integration/common/test-runner.sh b/jobs/ci-run/integration/common/test-runner.sh index d2cb968..36dedda 100644 --- a/jobs/ci-run/integration/common/test-runner.sh +++ b/jobs/ci-run/integration/common/test-runner.sh @@ -37,6 +37,9 @@ sudo apt-get -y update # set, so retries succeed. attempts=0 while [ $attempts -lt 3 ]; do + if ! which charmcraft >/dev/null 2>&1; then + sudo snap install charmcraft --classic || true + fi if ! which jq >/dev/null 2>&1; then sudo snap install jq || true fi