Skip to content

Commit

Permalink
add integration test that covers yanked packages
Browse files Browse the repository at this point in the history
testing repo:
https://github.com/cachito-testing/cachi2-pip-extra

Signed-off-by: Michal Šoltis <[email protected]>
  • Loading branch information
slimreaper35 authored and eskultety committed Apr 9, 2024
1 parent 1920ef1 commit 52f3a63
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/integration/test_data/pip_yanked/.build-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
environment_variables:
- name: PIP_FIND_LINKS
value: ${output_dir}/deps/pip
- name: PIP_NO_INDEX
value: 'true'
project_files: []
63 changes: 63 additions & 0 deletions tests/integration/test_data/pip_yanked/bom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"bomFormat": "CycloneDX",
"components": [
{
"name": "black",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "21.11b0"
},
{
"name": "foo",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
}
],
"purl": "pkg:pypi/[email protected]?vcs_url=git%2Bhttps://github.com/cachito-testing/cachi2-pip-extra.git%405f4d168cd573712e56914c326d5f7eff488d7f32",
"type": "library",
"version": "0.1.0"
},
{
"name": "terminado",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "0.13.0"
},
{
"name": "urllib3",
"properties": [
{
"name": "cachi2:found_by",
"value": "cachi2"
}
],
"purl": "pkg:pypi/[email protected]",
"type": "library",
"version": "2.0.1"
}
],
"metadata": {
"tools": [
{
"name": "cachi2",
"vendor": "red hat"
}
]
},
"specVersion": "1.4",
"version": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"pip/black-21.11b0.tar.gz": "sha256:83f3852301c8dcb229e9c444dd79f573c8d31c7c2dad9bbaaa94c808630e32aa",
"pip/terminado-0.13.0.tar.gz": "sha256:713531ccb5db7d4f544651f14050da79809030f00d1afa21462088cf32fb143a",
"pip/urllib3-2.0.1.tar.gz": "sha256:2ce66a68134be469f5df5d46d724237489b3cd85b2bba2223dbbee1746548826"
}
11 changes: 11 additions & 0 deletions tests/integration/test_pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@
),
id="pip_no_metadata",
),
pytest.param(
utils.TestParameters(
repo="https://github.com/cachito-testing/cachi2-pip-extra.git",
ref="5f4d168cd573712e56914c326d5f7eff488d7f32",
packages=({"path": ".", "type": "pip"},),
check_vendor_checksums=False,
expected_exit_code=0,
expected_output="All dependencies fetched successfully",
),
id="pip_yanked",
),
],
)
def test_pip_packages(
Expand Down

0 comments on commit 52f3a63

Please sign in to comment.