Project

Profile

Help

Issue #1412

Login with wrong credentials returns incorrect 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

After logging into pulp-admin with incorrect username and password, 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_login.LoginFailureTestCase
F.
======================================================================
FAIL: test_body (pulp_smash.tests.platform.api_v2.test_login.LoginFailureTestCase)
Assert that the response is valid JSON and has correct keys.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pulp_smash/tests/platform/api_v2/test_login.py", line 56, in test_body
    self.assertEqual(frozenset(self.response.json().keys()), ERROR_KEYS)
AssertionError: Items in the first set but not the second:
u'http_request_method'
u'auth_error_code'

----------------------------------------------------------------------
Ran 2 tests in 0.815s

FAILED (failures=1)

[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_login.py#L37
[3] https://github.com/PulpQE/pulp-smash/


Related issues

Related to Pulp - Issue #1413: Creating repository with invalid request body returns incorrert error data keysCLOSED - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by placko about 6 years ago

  • Version set to 2.7.0
  • OS set to RHEL 7

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

I would close one of this bugs https://pulp.plan.io/issues/1413 since the nature of the issue is the same,and make a generic bug summary, like 'Error data keys described in the docs are different from real body response'
I think we should just update the docs with 'http_request_method' key and add a comment that depending of the type of the issue there could be addition keys(for example the 404 will have 'resources and 400 will have 'property_names').

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

  • Tags Documentation added

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

  • Related to Issue #1413: Creating repository with invalid request body returns incorrert error data keys added

#5 Updated by Ichimonji10 about 6 years ago

I would close one of this bugs https://pulp.plan.io/issues/1413 since the nature of the issue is the same,and make a generic bug summary, like 'Error data keys described in the docs are different from real body response'

If you think all of the errors can be fixed at once, then sure. Pulp Smash chooses to run or skip tests based on the state of pulp.plan.io issues. Let's say we create a single issue describing a class of error that's encountered by fifteen different tests, and then close the issue. In that case, all fifteen skipped tess will start running again. So writing lots of similar bug reports can be annoying, but doing so lets us start fixing bugs and testing those fixes in a more granular manner.

I think we should just update the docs with 'http_request_method' key and add a comment that depending of the type of the issue there could be addition keys

Makes sense. Note that one of the five buggy API calls is missing a key. That API call is deserving of a separate fix.

#6 Updated by mhrivnak about 6 years ago

  • Triaged changed from No to Yes

#7 Updated by bmbouter almost 3 years ago

  • Status changed from NEW to CLOSED - WONTFIX

#8 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.

#9 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

#10 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