Skip to content
Draft
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
17 changes: 15 additions & 2 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,21 @@ def test_artifacthub_urls(container: ContainerData) -> None:
# for devel projects we pass it as a query
assert readme_url.path.endswith(".md")
assert "/README" in readme_url.path
assert "//" not in readme_url.path and "//" not in readme_url.path
# TODO(dmllr): add testing for logo-url
assert "//" not in readme_url.path

if "io.artifacthub.package.logo-url" in labels:
logo_url = urllib.parse.urlparse(
labels["io.artifacthub.package.logo-url"]
)
assert logo_url.scheme == "https"
assert logo_url.port is None
assert logo_url.netloc in (
"raw.githubusercontent.com",
"opensource.suse.com",
"gcc.gnu.org",
"spack.io",
)
assert "//" not in logo_url.path


@pytest.mark.parametrize(
Expand Down
Loading