diff --git a/charmcraft/utils/file.py b/charmcraft/utils/file.py index d4e20bba7..cb4d5be38 100644 --- a/charmcraft/utils/file.py +++ b/charmcraft/utils/file.py @@ -18,8 +18,8 @@ import os import pathlib import zipfile - from _stat import S_IRGRP, S_IROTH, S_IRUSR, S_IXGRP, S_IXOTH, S_IXUSR + from craft_cli import CraftError # handy masks for execution and reading for everybody diff --git a/tests/spread/store/resources/task.yaml b/tests/spread/store/resources/task.yaml index 8a6355124..81c233850 100644 --- a/tests/spread/store/resources/task.yaml +++ b/tests/spread/store/resources/task.yaml @@ -81,7 +81,8 @@ execute: | [[ "$new_architectures" == '["all"]' ]] # upload and verify the OCI image resource by digest - uploaded_revision=$(charmcraft upload-resource --format=json $CHARM_DEFAULT_NAME example-image --image=sha256:18a657d0cc1c7d0678a3fbea8b7eb4918bba25968d3e1b0adebfa71caddbc346 | jq -r '.revision') + # This is a different image hash because it's what Docker contains locally. + uploaded_revision=$(charmcraft upload-resource --format=json $CHARM_DEFAULT_NAME example-image --image=sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412 | jq -r '.revision') sleep 3 # Give the store a bit of time to process it last_revision=$(charmcraft resource-revisions $CHARM_DEFAULT_NAME example-image --format=json | jq -r .[0]) last_image_revno=$(echo $last_revision | jq .revision) diff --git a/tests/unit/commands/test_store.py b/tests/unit/commands/test_store.py index fe69d988a..8e9102e5f 100644 --- a/tests/unit/commands/test_store.py +++ b/tests/unit/commands/test_store.py @@ -164,7 +164,7 @@ def test_fetch_libs_no_charm_libs( Could not find the following libraries on charmhub: - lib: mysql.mysql version: '1' - - lib: some_charm.lib + - lib: some-charm.lib version: '1.2' """ ),