[tempest] also catch BadRequest in negative tests with physical_network in old API
Before this field was introduced we would raise BadRequest (HTTP 400), after - NotAcceptable (HTTP 406). Check for any of the exceptions to allow branchless testing. Change-Id: I3fafd4ef7f046a9195fc15f47f7fc967fb959550
This commit is contained in:
parent
da89a414e0
commit
bb72f2e3fc
@ -354,7 +354,7 @@ class TestPortsWithPhysicalNetworkOldAPI(base.BaseBaremetalTest):
|
||||
node_id = self.node['uuid']
|
||||
address = data_utils.rand_mac_address()
|
||||
|
||||
self.assertRaises(lib_exc.UnexpectedResponseCode,
|
||||
self.assertRaises((lib_exc.BadRequest, lib_exc.UnexpectedResponseCode),
|
||||
self.create_port,
|
||||
node_id=node_id, address=address,
|
||||
physical_network='physnet1')
|
||||
@ -371,7 +371,7 @@ class TestPortsWithPhysicalNetworkOldAPI(base.BaseBaremetalTest):
|
||||
'op': 'replace',
|
||||
'value': new_physnet}]
|
||||
|
||||
self.assertRaises(lib_exc.UnexpectedResponseCode,
|
||||
self.assertRaises((lib_exc.BadRequest, lib_exc.UnexpectedResponseCode),
|
||||
self.client.update_port,
|
||||
port['uuid'], patch)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user