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:
Fault(exception.ConvertedException(code=ex_value.code, ...)
Closes-Bug: #
1505153
Change-Id: I1aec8038774828d48da4b0e831b390e33243809a
(cherry picked from commit
867fccf833ffc597aa986cb6ff1b3b5c1101b9ba)
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: Ie486dc49c927f9b50f07c1fc562e89c090924a40
Closes-Bug: #
1505488
(cherry picked from commit
9a7cbe540c94d54194194f4747a52b8211f6372e)