Fix redfish test_get_system_resource_not_found test
[1] improved the sushy mocks, but did not properly use sushy.exceptions.ResourceNotFoundError (missing arguments). This slipped in because the CI jobs do not install sushy, so this code was never exercised. This commit adds the required parameters to the ResourceNotFoundError constructor. [1] - https://review.openstack.org/615621 Change-Id: I8b3d28fde0e89525d5968a33f0a6b89536ef1162
This commit is contained in:
parent
819491ee17
commit
dd95650371
@ -19,6 +19,7 @@ import os
|
||||
|
||||
import mock
|
||||
from oslo_utils import importutils
|
||||
import requests
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.drivers.modules.redfish import utils as redfish_utils
|
||||
@ -155,7 +156,9 @@ class RedfishUtilsTestCase(db_base.DbTestCase):
|
||||
def test_get_system_resource_not_found(self, mock_sushy):
|
||||
fake_conn = mock_sushy.return_value
|
||||
fake_conn.get_system.side_effect = (
|
||||
sushy.exceptions.ResourceNotFoundError())
|
||||
sushy.exceptions.ResourceNotFoundError('GET',
|
||||
'/',
|
||||
requests.Response()))
|
||||
|
||||
self.assertRaises(exception.RedfishError,
|
||||
redfish_utils.get_system, self.node)
|
||||
|
Loading…
Reference in New Issue
Block a user