Merge "Change quota tests to use assertEqual"
diff --git a/tempest/tests/compute/flavors/test_flavors.py b/tempest/tests/compute/flavors/test_flavors.py
index 9d0720e..8b49390 100644
--- a/tempest/tests/compute/flavors/test_flavors.py
+++ b/tempest/tests/compute/flavors/test_flavors.py
@@ -131,6 +131,18 @@
self.assertFalse(any([i for i in flavors if i['id'] == flavor_id]))
@attr(type='negative')
+ def test_invalid_minRam_filter(self):
+ self.assertRaises(exceptions.BadRequest,
+ self.client.list_flavors_with_detail,
+ {'minRam': 'invalid'})
+
+ @attr(type='negative')
+ def test_invalid_minDisk_filter(self):
+ self.assertRaises(exceptions.BadRequest,
+ self.client.list_flavors_with_detail,
+ {'minDisk': 'invalid'})
+
+ @attr(type='negative')
def test_get_flavor_details_for_invalid_flavor_id(self):
# Ensure 404 returned for non-existant flavor ID
self.assertRaises(exceptions.NotFound, self.client.get_flavor_details,
diff --git a/tempest/tests/compute/servers/test_server_metadata.py b/tempest/tests/compute/servers/test_server_metadata.py
index a338e0a..a214d15 100644
--- a/tempest/tests/compute/servers/test_server_metadata.py
+++ b/tempest/tests/compute/servers/test_server_metadata.py
@@ -86,6 +86,16 @@
# no teardown - all creates should fail
+ @attr(type='negative')
+ def test_create_metadata_key_error(self):
+ # Blank key should trigger an error.
+ meta = {'': 'data1'}
+ name = rand_name('server')
+ self.assertRaises(exceptions.BadRequest,
+ self.create_server_with_extras,
+ name, self.image_ref,
+ self.flavor_ref, meta=meta)
+
def test_update_server_metadata(self):
# The server's metadata values should be updated to the
# provided values
@@ -176,6 +186,14 @@
self.fail('An update should not happen for a nonexistant image')
@attr(type='negative')
+ def test_update_metadata_key_error(self):
+ # Blank key should trigger an error.
+ meta = {'': 'data1'}
+ self.assertRaises(exceptions.BadRequest,
+ self.client.update_server_metadata,
+ self.server_id, meta=meta)
+
+ @attr(type='negative')
def test_delete_nonexistant_server_metadata_item(self):
# Negative test: Should not be able to delete metadata item from a
# nonexistant server