Project

Profile

Help

Issue #1413

closed

Creating repository with invalid request body returns incorrert error data keys

Added by placko over 8 years ago. Updated almost 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.7.0
Platform Release:
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:

Description

When creating new repository with invalid or missing data keys provided, set of data keys returned in body differs from those described in documentation [1]. Output from test [2] in pulp-smash framework [3] testing this functionality follows. Tested on pulp 2.6 release and 2.7 release.

$ python -m unittest2 pulp_smash.tests.platform.api_v2.test_repository.CreateFailureTestCase
s.s
======================================================================
FAIL: test_exception_keys_json (pulp_smash.tests.platform.api_v2.test_repository.CreateFailureTestCase) (body={u'id': None})
Assert the JSON body returned contains the correct keys.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pulp_smash/tests/platform/api_v2/test_repository.py", line 147, in test_exception_keys_json
    ERROR_KEYS,
AssertionError: Items in the first set but not the second:
u'http_request_method'
u'property_names'

======================================================================
FAIL: test_exception_keys_json (pulp_smash.tests.platform.api_v2.test_repository.CreateFailureTestCase) (body=[u'Incorrect data type'])
Assert the JSON body returned contains the correct keys.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pulp_smash/tests/platform/api_v2/test_repository.py", line 147, in test_exception_keys_json
    ERROR_KEYS,
AssertionError: Items in the first set but not the second:
u'http_request_method'
Items in the second set but not the first:
u'error'

======================================================================
FAIL: test_exception_keys_json (pulp_smash.tests.platform.api_v2.test_repository.CreateFailureTestCase) (body={u'missing_required_keys': u'id'})
Assert the JSON body returned contains the correct keys.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pulp_smash/tests/platform/api_v2/test_repository.py", line 147, in test_exception_keys_json
    ERROR_KEYS,
AssertionError: Items in the first set but not the second:
u'http_request_method'
u'property_names'

======================================================================
FAIL: test_exception_keys_json (pulp_smash.tests.platform.api_v2.test_repository.CreateFailureTestCase) (body={u'id': u'2d46509d-da63-4806-a192-9c1e360084fe'})
Assert the JSON body returned contains the correct keys.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pulp_smash/tests/platform/api_v2/test_repository.py", line 147, in test_exception_keys_json
    ERROR_KEYS,
AssertionError: Items in the first set but not the second:
u'http_request_method'
u'resource_id'

----------------------------------------------------------------------
Ran 4 tests in 6.703s

FAILED (failures=4, skipped=2)

[1] https://pulp.readthedocs.org/en/latest/dev-guide/conventions/exceptions.html
[2] https://github.com/PulpQE/pulp-smash/blob/master/pulp_smash/tests/platform/api_v2/test_repository.py#L90
[3] https://github.com/PulpQE/pulp-smash


Related issues

Related to Pulp - Issue #1412: Login with wrong credentials returns incorrect error data keysCLOSED - WONTFIXActions
Actions #1

Updated by ipanova@redhat.com over 8 years ago

  • Related to Issue #1412: Login with wrong credentials returns incorrect error data keys added
Actions #2

Updated by mhrivnak over 8 years ago

  • Triaged changed from No to Yes
  • Tags Documentation added
Actions #3

Updated by bmbouter almost 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #4

Updated by bmbouter almost 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #5

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added
Actions #6

Updated by bmbouter almost 4 years ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Also available in: Atom PDF