Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Jun 12, 2024
1 parent dd26cbb commit c865ce3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions tests/integration/utils/test_skopeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def test_inspect_and_download(
monkeypatch, tmp_path: pathlib.Path, name: str, image: str, tag: str
):
(tmp_path / "tmp").mkdir()
monkeypatch.chdir(tmp_path)
skopeo = Skopeo(tmpdir=tmp_path / "tmp")

raw_data = skopeo.inspect(f"{image}:{tag}", raw=True)
Expand All @@ -75,8 +74,8 @@ def test_inspect_and_download(
by_os_arch_tar = tmp_path / f"{name}_{os}_{arch}.tar"
os_arch_skopeo = Skopeo(arch=arch, os=os)

os_arch_skopeo.copy(f"{image}:{tag}", f"oci-archive:{by_os_arch_tar.name}")
skopeo.copy(f"{image}@{digest}", f"oci-archive:{by_digest_tar.name}")
os_arch_skopeo.copy(f"{image}:{tag}", f"oci-archive:{by_os_arch_tar}")
skopeo.copy(f"{image}@{digest}", f"oci-archive:{by_digest_tar}")

assert by_digest_tar.exists()
assert by_os_arch_tar.exists()
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/services/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ def test_get_credentials(monkeypatch, store):
([], []),
(
[CharmLib(lib="my_charm.my_lib", version="1")],
[{"charm-name": "my_charm", "library-name": "my_lib", "api": 1}],
[{"charm-name": "my-charm", "library-name": "my_lib", "api": 1}],
),
(
[CharmLib(lib="my_charm.my_lib", version="1.0")],
[{"charm-name": "my_charm", "library-name": "my_lib", "api": 1, "patch": 0}],
[{"charm-name": "my-charm", "library-name": "my_lib", "api": 1, "patch": 0}],
),
],
)
Expand Down

0 comments on commit c865ce3

Please sign in to comment.