Expect badRequest in server metadata negative test
In Nova V2, when server is being created with long metadata, exception
OverLimit is thrown. But Nova V2.1 API has strong input validation
and catch long metadata during input validation only and throw badRequest.
This patch modifies the negative test to expect both exception.
This is needed to share V2 and V2.1 tests.
Change-Id: I1e619389f1f986374e7d1da86eecf3074a591711
diff --git a/tempest/api/compute/servers/test_server_metadata_negative.py b/tempest/api/compute/servers/test_server_metadata_negative.py
index ad1ec70..8b074fd 100644
--- a/tempest/api/compute/servers/test_server_metadata_negative.py
+++ b/tempest/api/compute/servers/test_server_metadata_negative.py
@@ -40,7 +40,7 @@
for sz in [256, 257, 511, 1023]:
key = "k" * sz
meta = {key: 'data1'}
- self.assertRaises(exceptions.OverLimit,
+ self.assertRaises((exceptions.BadRequest, exceptions.OverLimit),
self.create_test_server,
meta=meta)