diff options
author | Sam Betts <sam@code-smash.net> | 2018-05-08 14:08:02 +0100 |
---|---|---|
committer | Jim Rollenhagen <jim@jimrollenhagen.com> | 2018-05-08 22:52:19 +0000 |
commit | 6ff9a6b14c22c2cf640ba7a20828fed976b25f03 (patch) | |
tree | d559fc86617dd9c2d391ae0b081cc7cc4b6546c8 /ironic/tests | |
parent | 02d8fa139357677240d55248b7bb8ad4d6a90c0a (diff) | |
download | ironic-6ff9a6b14c22c2cf640ba7a20828fed976b25f03.tar.gz |
Make validation failure on node deploy a 4XX code
Missing information and other validation issues with instance_info is a
user error and should be a 4XX code HTTP response, currently Ironic
responds with a 5XX code indicating something has gone wrong with the
service.
Change-Id: If76e2aba97e0ed9fa63ad3c411ed92969164d3dc
Story: #2001983
Task: #19600
Diffstat (limited to 'ironic/tests')
-rw-r--r-- | ironic/tests/unit/conductor/test_manager.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ironic/tests/unit/conductor/test_manager.py b/ironic/tests/unit/conductor/test_manager.py index eb6cd3eed..7efbdc681 100644 --- a/ironic/tests/unit/conductor/test_manager.py +++ b/ironic/tests/unit/conductor/test_manager.py @@ -1218,6 +1218,7 @@ class ServiceDoNodeDeployTestCase(mgr_utils.ServiceSetUpMixin, self.context, node.uuid) # Compare true exception hidden by @messaging.expected_exceptions self.assertEqual(exception.InstanceDeployFailure, exc.exc_info[0]) + self.assertEqual(exc.exc_info[1].code, 400) # Check the message of InstanceDeployFailure. In a # messaging.rpc.ExpectedException sys.exc_info() is stored in exc_info # in the exception object. So InstanceDeployFailure will be in |