Skip to content

Commit

Permalink
Fix oci tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hind-M committed Oct 1, 2024
1 parent 8b1f849 commit 105e18e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/source/developer_zone/changes-2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,5 @@ Listing packages in the created ``pandoc_from_oci`` environment:
$ micromamba list -n pandoc_from_oci
Name Version Build Channel
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
pandoc 3.2 ha770c72_0 https://pkg-containers.githubusercontent.com/ghcr1/blobs/pandoc-3.2-ha770c72_0.conda
─────────────────────────────────────────────────────────────────────────────────────
pandoc 3.2 ha770c72_0 https://pkg-containers.githubusercontent.com/ghcr1/blobs
20 changes: 8 additions & 12 deletions micromamba/tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,9 +1231,8 @@ def test_create_from_oci_mirrored_channels(tmp_home, tmp_root_prefix, tmp_path,
assert pkg["name"] == "pandoc"
if spec == "pandoc=3.1.13":
assert pkg["version"] == "3.1.13"
assert pkg["base_url"].startswith(
"https://pkg-containers.githubusercontent.com/ghcr1/blobs/pandoc"
)
assert pkg["base_url"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"
assert pkg["channel"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"


@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
Expand Down Expand Up @@ -1261,16 +1260,14 @@ def test_create_from_oci_mirrored_channels_with_deps(tmp_home, tmp_root_prefix,
assert len(packages) > 2
assert any(
package["name"] == "xtensor"
and package["base_url"].startswith(
"https://pkg-containers.githubusercontent.com/ghcr1/blobs/xtensor"
)
and package["base_url"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"
and package["channel"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"
for package in packages
)
assert any(
package["name"] == "xtl"
and package["base_url"].startswith(
"https://pkg-containers.githubusercontent.com/ghcr1/blobs/xtl"
)
and package["base_url"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"
and package["channel"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"
for package in packages
)

Expand Down Expand Up @@ -1304,9 +1301,8 @@ def test_create_from_oci_mirrored_channels_pkg_name_mapping(
assert len(packages) == 1
pkg = packages[0]
assert pkg["name"] == "_go_select"
assert pkg["base_url"].startswith(
"https://pkg-containers.githubusercontent.com/ghcr1/blobs/_go_select"
)
assert pkg["base_url"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"
assert pkg["channel"] == "https://pkg-containers.githubusercontent.com/ghcr1/blobs"


@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
Expand Down

0 comments on commit 105e18e

Please sign in to comment.