Add skips for tests when dependency not present
Adds dependent skips for a couple of tests that need MULTI_USER but
currently are executed anyway even if MULTI_USER is not set.
Change-Id: Ibec8d2a8ff6a34a8b341ff947418454704603ec7
diff --git a/tempest/tests/compute/images/test_images_oneserver.py b/tempest/tests/compute/images/test_images_oneserver.py
index 2841a21..f8b560b 100644
--- a/tempest/tests/compute/images/test_images_oneserver.py
+++ b/tempest/tests/compute/images/test_images_oneserver.py
@@ -82,6 +82,8 @@
self.fail("Should raise 413 Over Limit if meta data was too long")
@attr(type='negative')
+ @unittest.skipUnless(compute.MULTI_USER,
+ 'Need multiple users for this test.')
def test_delete_image_of_another_tenant(self):
# Return an error while trying to delete another tenant's image
self.servers_client.wait_for_server_status(self.server['id'], 'ACTIVE')
@@ -121,6 +123,8 @@
self.assertEqual(original_image['minDisk'], image['minDisk'])
@attr(type='negative')
+ @unittest.skipUnless(compute.MULTI_USER,
+ 'Need multiple users for this test.')
def test_create_image_for_server_in_another_tenant(self):
# Creating image of another tenant's server should be return error