Merge "Remove a redundant 'body' variable"
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index cdf0b23..36dc6c3 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -126,11 +126,12 @@
self.assertEqual(new_image_name, body['name'])
-class ListImagesTest(base.BaseV2ImageTest):
+class ListUserImagesTest(base.BaseV2ImageTest):
+ """Here we test the listing of image information"""
@classmethod
def resource_setup(cls):
- super(ListImagesTest, cls).resource_setup()
+ super(ListUserImagesTest, cls).resource_setup()
# We add a few images here to test the listing functionality of
# the images API
container_fmts = CONF.image.container_formats
@@ -166,10 +167,6 @@
return image['id']
-
-class ListUserImagesTest(ListImagesTest):
- """Here we test the listing of image information"""
-
def _list_by_param_value_and_assert(self, params):
"""Perform list action with given params and validates result."""
# Retrieve the list of images that meet the filter
@@ -323,7 +320,7 @@
self.assertEqual("images", body['name'])
-class ListSharedImagesTest(ListImagesTest):
+class ListSharedImagesTest(base.BaseV2ImageTest):
"""Here we test the listing of a shared image information"""
credentials = ['primary', 'alt']
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index 2d2f7df..4a938f9 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -18,6 +18,7 @@
from tempest.common import waiters
from tempest import config
+from tempest.lib.common.utils import data_utils
from tempest.lib.common.utils import test_utils
from tempest.lib import exceptions
from tempest.scenario import manager
@@ -79,6 +80,14 @@
'verify metadata on server. '
'%s is empty.' % md_url)
+ # Also, test a POST
+ md_url = 'http://169.254.169.254/openstack/2013-10-17/password'
+ data = data_utils.arbitrary_string(100)
+ cmd = 'curl -X POST -d ' + data + ' ' + md_url
+ self.ssh_client.exec_command(cmd)
+ result = self.servers_client.show_password(self.instance['id'])
+ self.assertEqual(data, result['password'])
+
def _mount_config_drive(self):
cmd_blkid = 'blkid | grep -i config-2'
result = self.ssh_client.exec_command(cmd_blkid)