API tests not checking the return code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
Medium
|
Lucas Alvares Gomes |
Bug Description
Some of our tests in the API is not checking for the return code, for e.g at ironic/
def test_remove_
This test in particular is a problem, it would be expected to it to return 400 (Bad Request) since the user is removing an attribute that doesn't exist, but it's returning 500 instead because it's raising an exception which is not being captured by our patch() method. (see: http://
So we have to check the return codes in the API tests.
Changed in ironic: | |
milestone: | none → icehouse-3 |
importance: | Undecided → Critical |
importance: | Critical → High |
assignee: | nobody → Lucas Alvares Gomes (lucasagomes) |
Changed in ironic: | |
importance: | High → Medium |
Changed in ironic: | |
status: | Fix Committed → Fix Released |
Changed in ironic: | |
milestone: | icehouse-3 → 2014.1 |
Reviewed: https:/ /review. openstack. org/70766 /git.openstack. org/cgit/ openstack/ ironic/ commit/ ?id=969dac648d4 540e2a0bc6f7571 72ff54f102fe5d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 969dac648d4540e 2a0bc6f757172ff 54f102fe5d
Author: Lucas Alvares Gomes <email address hidden>
Date: Mon Feb 3 16:29:52 2014 +0000
API tests to check for the return codes
Some API tests were just checking whether a particular request would app.AppError) or not, and this is not errors= True) and also check if the HTTP code returned
raise a generic exception (webtest.
enough, the API tests should make sure that the request will raise an
exception (expect_
is appropriated for that error.
The FIXME left at test_remove_fail() is going to be fixed by a following
patch.
Closes-Bug: #1275812 c6d322192c397bb fe33919cf2d
Change-Id: I156749b3de0627