Actions
Task #5968
closedActually implement filters for PublicationViewset
Start date:
Due date:
% Done:
0%
Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
Problem¶
pulpcore defines functional tests to verify filtering publications by repository_version
, distributions
, and pulp_created
(see
https://github.com/pulp/pulpcore/blob/master/pulpcore/tests/functional/api/using_plugin/test_crd_publications.py#L93-L132).
Funnily enough, PublicationViewset
defines no filters, but the tests pass. That's because DRF simply ignores the filter parameters in this case and returns all publications. Since there is a single publication overall in these tests, this result isn't any different from the result a proper filter implementation would return.
Solution¶
- Decide which filters to actually implement (proposal: at least
repository_version
(NB it has already been noted in #5665 that this does not work)) - Implement these filters
- Include negative test cases
Related issues
Actions
Allow to filter publications by
repository_version
andpulp_created
https://pulp.plan.io/issues/5968 ref #5968