Bug 1127817

Summary: Retrieving consumer history for a consumer that doesn't exist results in a 200 OK
Product: [Retired] Pulp Reporter: Jeremy Cline <jcline>
Component: API/integrationAssignee: amacdona <austin>
Status: CLOSED UPSTREAM QA Contact: Irina Gulina <igulina>
Severity: low Docs Contact:
Priority: medium    
Version: MasterCC: austin, igulina, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.6.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 22:14:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jeremy Cline 2014-08-07 15:31:51 UTC
Description of problem:
The docs (https://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/consumer/history.html#retrieve-consumer-event-history) say a 404 should be returned if the consumer doesn't exist. However, a 200 and an empty list is actually returned.

Version-Release number of selected component (if applicable): master

How reproducible: always

Steps to Reproduce:
1. curl -i -H "Accept: application/json" -X GET -u admin:admin -k 'https://localhost/pulp/api/v2/consumers/NotARealConsumer/history/'

Actual results:
HTTP/1.1 200 OK
Date: Thu, 07 Aug 2014 15:25:56 GMT
Server: Apache/2.4.10 (Fedora) OpenSSL/1.0.1e-fips mod_wsgi/3.5 Python/2.7.5
Content-Length: 2
Content-Type: application/json


Expected results:
404 Not Found

Additional info:

Comment 1 amacdona@redhat.com 2014-11-04 23:46:35 UTC

Comment 2 Chris Duryee 2014-12-23 20:53:04 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 3 Irina Gulina 2015-01-13 13:23:17 UTC
>> rpm -qa pulp-server

>> curl -i -H "Accept: application/json" -X GET -u admin:admin -k 'https://localhost/pulp/api/v2/consumers/NotARealConsumer/history/'
HTTP/1.1 404 Not Found
Date: Tue, 13 Jan 2015 13:03:43 GMT
Server: Apache/2.2.15 (Red Hat)
Content-Length: 4
Connection: close
Content-Type: application/json


Comment 4 Brian Bouterse 2015-02-28 22:14:30 UTC
Moved to https://pulp.plan.io/issues/481