Skip to content

Commit

Permalink
test: fix resource image upload test.
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Jun 12, 2024
1 parent 53beef7 commit 22a7cf4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charmcraft/utils/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/spread/store/resources/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/commands/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
"""
),
Expand Down

0 comments on commit 22a7cf4

Please sign in to comment.