Fix FIP negative tests for nova V2.1 API
Nova V2.1 API have strong input validation.
Ia04256e0c1f9235769035cc9e7eadd864112559c adds schema for add floating ip
for strong input validation but tempest negative test fail.
In case of empty FIP, tests should expect Bad Request also in case
of V2.1.
Closes-Bug: #1414996
Change-Id: I38a2f5cb336ddd22ac920aebecf95bdcd3524a74
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
index 2b0f268..b08df97 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
@@ -89,7 +89,7 @@
@test.services('network')
def test_associate_ip_to_server_without_passing_floating_ip(self):
# Negative test:Association of empty floating IP to specific server
- # should raise NotFound exception
- self.assertRaises(exceptions.NotFound,
+ # should raise NotFound or BadRequest(In case of Nova V2.1) exception.
+ self.assertRaises((exceptions.NotFound, exceptions.BadRequest),
self.client.associate_floating_ip_to_server,
'', self.server_id)