]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Squashed commit of WebOb 1.5 and oslo.db fixes
authorDavanum Srinivas <davanum@gmail.com>
Wed, 7 Oct 2015 01:45:12 +0000 (18:45 -0700)
committerMatt Riedemann <mriedem@us.ibm.com>
Tue, 13 Oct 2015 16:30:03 +0000 (09:30 -0700)
commit61026d4e4f2a58dd84ffb2e4e40ab99860b9316a
tree86ae30e27baca539bb8e2e7a458e751fbc1bfe0f
parent5268a8d61beee1b18d14fd3738e763a0a61b00f1
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
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)
cinder/exception.py
test-requirements.txt