Project

Profile

Help

Issue #1413

Creating repository with invalid request body returns incorrert error data keys

Added by placko about 6 years ago. Updated over 1 year 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 - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by ipanova@redhat.com about 6 years ago

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

#2 Updated by mhrivnak about 6 years ago

  • Triaged changed from No to Yes
  • Tags Documentation added

#3 Updated by bmbouter almost 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#4 Updated by bmbouter almost 3 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.

#5 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

#6 Updated by bmbouter over 1 year ago

  • Category deleted (14)

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

Also available in: Atom PDF