Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install oras
uses: oras-project/setup-oras@5e2f2482b30b0cb3e14e67f89a80c88c659a7c63 # v2
uses: oras-project/setup-oras@ac735097e22fe643015b0d19645f7c9a69942128 # v2
- name: Install uv
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
- name: Set up Python
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install oras
uses: oras-project/setup-oras@5e2f2482b30b0cb3e14e67f89a80c88c659a7c63 # v2
uses: oras-project/setup-oras@ac735097e22fe643015b0d19645f7c9a69942128 # v2
- run: oras version
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
Expand Down Expand Up @@ -403,7 +403,7 @@ jobs:
- name: Install Skopeo
uses: ./.github/actions/install-skopeo
- name: Install oras
uses: oras-project/setup-oras@5e2f2482b30b0cb3e14e67f89a80c88c659a7c63 # v2
uses: oras-project/setup-oras@ac735097e22fe643015b0d19645f7c9a69942128 # v2
- run: oras version
- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
Expand Down
14 changes: 10 additions & 4 deletions tests/backend/test_oras_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def test_is_oras():
@pytest.mark.e2e_oras
def test_oras_pull(tmp_path):
"""Test oras to pull/dl a known base-image to an oci-layout

OCI image-layout spec do not specify ordering of tagged descriptors in `index.json`: https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#indexjson-file
"""
oras_pull("quay.io/mmortari/hello-world-wait:latest", tmp_path)

Expand All @@ -30,10 +32,14 @@ def test_oras_pull(tmp_path):
mut = read_ocilayout_root_index(tmp_path)
assert mut.schemaVersion == 2
assert len(mut.manifests) == 3
manifest0 = mut.manifests[0]
assert manifest0.mediaType == "application/vnd.oci.image.index.v1+json"
assert manifest0.digest == "sha256:d437889e826ecce2116ac711469bd09b1bb3c64d45055cbf23a6f8f3db223b8b"
assert manifest0.size == 491

# per image-layout spec, we can't rely on `:latest` being the first one, we locate it:
tagged = [m for m in mut.manifests if (m.annotations or {}).get("org.opencontainers.image.ref.name") == "latest"]
assert len(tagged) == 1
manifest_latest = tagged[0]
assert manifest_latest.mediaType == "application/vnd.oci.image.index.v1+json"
assert manifest_latest.digest == "sha256:d437889e826ecce2116ac711469bd09b1bb3c64d45055cbf23a6f8f3db223b8b"
assert manifest_latest.size == 491


@pytest.mark.e2e_oras
Expand Down
Loading