Project

Profile

Help

Issue #4780

closed

Task search by invalid field should raise meaningful error

Added by rochacbruno over 5 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
(Total: 0:00 h)
Severity:
2. Medium
Version:
Master
Platform Release:
3.0.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Reference and discussion: https://github.com/pulp/pulpcore/pull/115#issuecomment-488880787

When we request:

/pulp/api/v3/tasks/?name=pulpcore.app.tasks.repository.update

We get the correct results of all update tasks.

But if we request an invalid field name:

/pulp/api/v3/tasks/?invalidfield=foobar

Or an invalid value to a proper field like the escaped `+`

/pulp/api/v3/tasks/?name=+'

We get all results, the same result if I simply request /pulp/api/v3/tasks/ without params.

What I expected was to see an error like:

Invalid Field name

And for the second case to get `0` results.


Sub-issues 1 (0 open1 closed)

Test #4781: Assert search raises error when filtering by invalid fieldCLOSED - DUPLICATEActions

Related issues

Related to Pulp - Test #4230: Test task name and search for task based on their nameCLOSED - COMPLETErochacbrunoActions
Related to RPM Support - Issue #4857: Pulp 2 Nightly Regression in test_iso_crud.ISOUpdateTestCase.test_allCLOSED - DUPLICATEActions

Also available in: Atom PDF