Tests fail depending on which checksums are enabled
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 91
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 22
Description
If you don't configure ALLOWED_CONTENT_CHECKSUMS, it defaults to everything but md5 and sha1. And it looks like tests will fail in this case:
E pulpcore.exceptions.validation.UnsupportedDigestValidationError: Checksum algorithms ['md5', 'sha1'] are forbidden for this Pulp instance.
../pulpcore/pulpcore/app/models/content.py:269: UnsupportedDigestValidationError
============================================================== short test summary info ===============================================================
FAILED pulp_deb/tests/unit/test_models.py::TestPackage::test_filename - pulpcore.exceptions.validation.UnsupportedDigestValidationError: Checksum a...
I think ideally the test should either not rely on these checksums or be skipped if the checksums they require a certain checksum that is not enabled. Here's an example of the latter:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pulp_deb/tests/unit/test_models.py::TestPackage::test_filename and reproduce the failure using the default ALLOWED_CONTENT_CHECKSUMS configuration. Read pulpcore/pulpcore/app/models/content.py:269 and compare the referenced pulp_rpm test pattern. Done means the test no longer fails when md5 and sha1 are forbidden, either by avoiding those checksums or skipping when they are disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100