summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Qiao <taget@linux.vnet.ibm.com>2014-10-10 17:06:02 +0800
committerEli Qiao <taget@linux.vnet.ibm.com>2014-10-13 11:17:05 +0800
commita7f3d99be36921dc8021c472f2a6f06eca49c579 (patch)
tree5338b811142ff38a815c2ceadd8df4cb48db5d62
parentd40ea28aa1236e9e70bd5bab0e457a274798ca23 (diff)
downloadtempest-a7f3d99be36921dc8021c472f2a6f06eca49c579.tar.gz
Add exceptions.BadRequest to the test case of reserve_fixed_ip
we change the exception of reserve_fixed_ip in fixed_ip api to HTTPBadRequest, add this exception to tempest, and also we need to accept HTTPNotFound exception to support juno test cases. Change-Id: Iafd2fb82ad5d50c2f4b3f0819ac7a6f8aa901264
-rw-r--r--tempest/api/compute/admin/test_fixed_ips_negative.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tempest/api/compute/admin/test_fixed_ips_negative.py b/tempest/api/compute/admin/test_fixed_ips_negative.py
index 90be8201b..8d6a7fcfb 100644
--- a/tempest/api/compute/admin/test_fixed_ips_negative.py
+++ b/tempest/api/compute/admin/test_fixed_ips_negative.py
@@ -68,7 +68,10 @@ class FixedIPsNegativeTestJson(base.BaseV2ComputeAdminTest):
# NOTE(maurosr): since this exercises the same code snippet, we do it
# only for reserve action
body = {"reserve": "None"}
- self.assertRaises(exceptions.NotFound,
+ # NOTE(eliqiao): in Juno, the exception is NotFound, but in master, we
+ # change the error code to BadRequest, both exceptions should be
+ # accepted by tempest
+ self.assertRaises((exceptions.NotFound, exceptions.BadRequest),
self.client.reserve_fixed_ip,
"my.invalid.ip", body)