Update DatastoreNotFound status code to 404
Explicitly specifying DatastoreNotFound exception to return http status code 404. Previously we weren't specifying the status code for the exception and were returning 400 by default. The unit test depending on the previous status code has been updated to reflect this change. Closes-Bug: 1415031 Change-Id: I30bd97d53d1d51704133eb63e25f32a20cf0d9a1
This commit is contained in:
parent
23a682b89d
commit
54fa006ea2
@ -338,7 +338,8 @@ class Controller(object):
|
||||
exception.DatabaseNotFound,
|
||||
exception.QuotaResourceUnknown,
|
||||
exception.BackupFileNotFound,
|
||||
exception.ClusterNotFound
|
||||
exception.ClusterNotFound,
|
||||
exception.DatastoreNotFound,
|
||||
],
|
||||
webob.exc.HTTPConflict: [
|
||||
exception.BackupNotCompleteError,
|
||||
|
@ -245,7 +245,7 @@ class ListBackups(object):
|
||||
@test
|
||||
def test_backup_list_filter_datastore_not_found(self):
|
||||
"""Test list backups and filter by datastore."""
|
||||
assert_raises(exceptions.BadRequest, instance_info.dbaas.backups.list,
|
||||
assert_raises(exceptions.NotFound, instance_info.dbaas.backups.list,
|
||||
datastore='NOT_FOUND')
|
||||
|
||||
@test
|
||||
|
Loading…
x
Reference in New Issue
Block a user