Project

Profile

Help

Task #5968

closed

Actually implement filters for PublicationViewset

Added by gmbnomis almost 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
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

  1. Decide which filters to actually implement (proposal: at least repository_version (NB it has already been noted in #5665 that this does not work))
  2. Implement these filters
  3. Include negative test cases

Related issues

Related to Pulp - Story #5665: Publications do not have a natural key and are not searchable by repository version.CLOSED - WONTFIX

Actions

Also available in: Atom PDF