Hide Forgot
Description of problem: http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/role/cud.html#add-a-user-to-a-role FAIL: test_08_add_unexistant_user (tests.test_06_roles.SimpleRoleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/myprojects/pulp-automation/tests/test_06_roles.py", line 108, in test_08_add_unexistant_user self.assertPulp(code=400) File "/home/user/myprojects/pulp-automation/tests/pulp_test.py", line 57, in assertPulp code File "/home/ipanova/myprojects/pulp-automation/tests/pulp_test.py", line 66, in assertEqual super(PulpTest, self).assertEqual(a, b, pprint.pformat("%r != %r" % (a, b))) AssertionError: '404 != 400' -------------------- >> begin captured logging << -------------------- urllib3.connectionpool: DEBUG: "POST /pulp/api/v2/roles/SimpleRoleTest_role/users/ HTTP/1.1" 404 439 pulp_auto.pulp: DEBUG: <pulp_auto.pulp.Pulp object at 0x19dd4d0>.send(Request('POST', u'/roles/SimpleRoleTest_role/users/', data='{"login": "Unexistant_user"}', headers={'Content-Type': 'application/json'})) == <Response [404]> Version-Release number of selected component (if applicable): 2.4.0-0.23.beta How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: 404 code is returned Expected results: 400 code is returned Additional info:
https://github.com/pulp/pulp/pull/1310
fixed in pulp 2.6.0-0.2.beta
rpm -qa | grep pulp-server pulp-server-2.6.0-0.2.beta.el6.noarch >> curl -i -H "Accept: application/json" -X POST -k -u admin:admin -d '{"login": "test-user"}' 'https://localhost/pulp/api/v2/roles/test-role/users/' HTTP/1.1 200 OK Date: Fri, 26 Dec 2014 02:31:11 GMT Server: Apache/2.2.15 (Red Hat) Content-Length: 4 Connection: close Content-Type: application/json >> curl -i -H "Accept: application/json" -X POST -k -u admin:admi '{"login": "genka"}' 'https://localhost/pulp/api/v2/roles/test-role/users/' HTTP/1.1 400 Bad Request Date: Fri, 26 Dec 2014 02:31:24 GMT Server: Apache/2.2.15 (Red Hat) Content-Encoding: utf-8 Content-Length: 378 Connection: close Content-Type: application/json {"http_request_method": "POST", "exception": null, "error_message": "Invalid properties: ['login']", "property_names": ["login"], "_href": "/pulp/api/v2/roles/test-role/users/", "http_status": 400, "error": {"code": "PLP0015", "data": {"property_names": ["login"], "properties": "['login']"}, "description": "Invalid properties: ['login']", "sub_errors": []}, "traceback": null}
Moved to https://pulp.plan.io/issues/468