Add testresources and testscenarios used by oslo.db fixture
If we use oslo.db fixtures, we'll need these 2 packages or
the next version of oslo.db release will break us.
Closes-Bug: #1503501
Change-Id: I8facdaf69c79b1b1ae4f9f64e9856e12f14440ed
(cherry picked from commit ec40c3b6ddbfa4912ca6e612558efaef6043f3ae)
Fix test_misc for WebOb 1.5
WebOb 1.5 was released at 2015-10-11. With this new version,
webob.exc.WSGIHTTPException() constructor now fails with a KeyError
when the HTTP status code is 0.
test_exceptions_raise() of test_misc tries to instanciate all
exceptions of cinder.exception. The problem is that
ConvertedException uses a default HTTP status code of 0.
Modify the default HTTP status code of ConvertedException to 400 to
fix the unit test. The bug is only in the test,
cinder/api/openstack/wsgi.py copies an existing HTTP code:
Reviewed: https:/ /review. openstack. org/234329 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=61026d4e4f2 a58dd84ffb2e4e4 0ab99860b9316a
Committed: https:/
Submitter: Jenkins
Branch: stable/liberty
commit 61026d4e4f2a58d d84ffb2e4e40ab9 9860b9316a
Author: Davanum Srinivas <email address hidden>
Date: Tue Oct 6 18:45:12 2015 -0700
Squashed commit of WebOb 1.5 and oslo.db fixes
Add testresources and testscenarios used by oslo.db fixture
If we use oslo.db fixtures, we'll need these 2 packages or
the next version of oslo.db release will break us.
Closes-Bug: #1503501 b1ae4f9f64e9856 e12f14440ed 12ca6e612558efa ef6043f3ae)
Change-Id: I8facdaf69c79b1
(cherry picked from commit ec40c3b6ddbfa49
Fix test_misc for WebOb 1.5
WebOb 1.5 was released at 2015-10-11. With this new version, exc.WSGIHTTPExc eption( ) constructor now fails with a KeyError
webob.
when the HTTP status code is 0.
test_ exceptions_ raise() of test_misc tries to instanciate all ception uses a default HTTP status code of 0.
exceptions of cinder.exception. The problem is that
ConvertedEx
Modify the default HTTP status code of ConvertedException to 400 to api/openstack/ wsgi.py copies an existing HTTP code:
fix the unit test. The bug is only in the test,
cinder/
Closes-Bug: #1505153 d48da4b0e831b39 0e33243809a 7aa986cb6ff1b3b 5c1101b9ba)
Change-Id: I1aec8038774828
(cherry picked from commit 867fccf833ffc59
Change default Exception code to 500
As a part of the fix for LP#1505153, the invalid
response of 0 was changed to 400 to fix a running
issue with the new version of WebOb.
It was pointed out after the fact however that a
500 might be more appropriate here.
Additionally, other projects have implemented a 500
as the default so for the sake of consistency we should
consider doing the same.
This patch just changes the 400 to a 500 as the default
code.
Conflicts:
cinder/ tests/unit/ test_exception. py
NOTE(mriedem): The conflict is due to 17802086f not being
in stable/liberty.
Change-Id: Ie486dc49c927f9 b50f07c1fc562e8 9c090924a40 194194f4747a52b 8211f6372e)
Closes-Bug: #1505488
(cherry picked from commit 9a7cbe540c94d54