Task #5968
closedActually implement filters for PublicationViewset
0%
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
Updated by gmbnomis almost 5 years ago
- Related to Story #5665: Publications do not have a natural key and are not searchable by repository version. added
Updated by gmbnomis almost 5 years ago
PR for repository_version
and pulp_created
at https://github.com/pulp/pulpcore/pull/488. And, no, I won't implement distributions
(actually distribution
might be better, IMHO) ;-)
I had to disable the "distributions" test for now (It fails now because there is a filter implementation that does not know about "distributions")
Added by gmbnomis almost 5 years ago
Updated by fao89 almost 5 years ago
- Tracker changed from Issue to Task
- % Done set to 0
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Allow to filter publications by
repository_version
andpulp_created
https://pulp.plan.io/issues/5968 ref #5968