Merge "Get rid of useless tenant_id attribiute"
diff --git a/tempest/api/volume/admin/v2/test_volumes_list.py b/tempest/api/volume/admin/v2/test_volumes_list.py
index 4437803..cdd9df9 100644
--- a/tempest/api/volume/admin/v2/test_volumes_list.py
+++ b/tempest/api/volume/admin/v2/test_volumes_list.py
@@ -29,7 +29,9 @@
def resource_setup(cls):
super(VolumesListAdminV2TestJSON, cls).resource_setup()
# Create 3 test volumes
- cls.volume_list = []
+ # NOTE(zhufl): When using pre-provisioned credentials, the project
+ # may have volumes other than those created below.
+ cls.volume_list = cls.volumes_client.list_volumes()['volumes']
for i in range(3):
volume = cls.create_volume()
# Fetch volume details
@@ -59,5 +61,6 @@
# primary tenant
fetched_tenant_id = [operator.itemgetter(
'os-vol-tenant-attr:tenant_id')(item) for item in fetched_list]
- expected_tenant_id = [self.volumes_client.tenant_id] * 3
+ expected_tenant_id = [self.volumes_client.tenant_id] * \
+ len(self.volume_list)
self.assertEqual(expected_tenant_id, fetched_tenant_id)
diff --git a/tempest/api/volume/v3/base.py b/tempest/api/volume/v3/base.py
index c31c83c..e38f947 100644
--- a/tempest/api/volume/v3/base.py
+++ b/tempest/api/volume/v3/base.py
@@ -44,7 +44,7 @@
@classmethod
def setup_clients(cls):
super(VolumesV3Test, cls).setup_clients()
- cls.messages_client = cls.os.volume_messages_client
+ cls.messages_client = cls.os.volume_v3_messages_client
def setUp(self):
super(VolumesV3Test, self).setUp()
@@ -60,5 +60,5 @@
@classmethod
def setup_clients(cls):
super(VolumesV3AdminTest, cls).setup_clients()
- cls.admin_messages_client = cls.os_adm.volume_messages_client
+ cls.admin_messages_client = cls.os_adm.volume_v3_messages_client
cls.admin_volume_types_client = cls.os_adm.volume_types_v2_client
diff --git a/tempest/clients.py b/tempest/clients.py
index 0158efd..d131dc4 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -292,7 +292,7 @@
self.snapshots_v2_client = self.volume_v2.SnapshotsClient()
self.volumes_client = self.volume_v1.VolumesClient()
self.volumes_v2_client = self.volume_v2.VolumesClient()
- self.volume_messages_client = volume.v3.MessagesClient(
+ self.volume_v3_messages_client = volume.v3.MessagesClient(
self.auth_provider, **params)
self.volume_types_client = self.volume_v1.TypesClient()
self.volume_types_v2_client = self.volume_v2.TypesClient()
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 6ce4cfe..2c4be97 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -402,10 +402,14 @@
servers = self.servers_client.list_servers()
servers = servers['servers']
for server in servers:
- console_output = self.servers_client.get_console_output(
- server['id'])['output']
- LOG.debug('Console output for %s\nbody=\n%s',
- server['id'], console_output)
+ try:
+ console_output = self.servers_client.get_console_output(
+ server['id'])['output']
+ LOG.debug('Console output for %s\nbody=\n%s',
+ server['id'], console_output)
+ except lib_exc.NotFound:
+ LOG.debug("Server %s disappeared(deleted) while looking"
+ "for the console log", server['id'])
def _log_net_info(self, exc):
# network debug is called as part of ssh init
diff --git a/tempest/scenario/test_object_storage_basic_ops.py b/tempest/scenario/test_object_storage_basic_ops.py
index 9ac1e30..1d2b2b6 100644
--- a/tempest/scenario/test_object_storage_basic_ops.py
+++ b/tempest/scenario/test_object_storage_basic_ops.py
@@ -18,23 +18,21 @@
class TestObjectStorageBasicOps(manager.ObjectStorageScenarioTest):
- """Test swift basic ops.
-
- * get swift stat.
- * create container.
- * upload a file to the created container.
- * list container's objects and assure that the uploaded file is present.
- * download the object and check the content
- * delete object from container.
- * list container's objects and assure that the deleted file is gone.
- * delete a container.
- * list containers and assure that the deleted container is gone.
- * change ACL of the container and make sure it works successfully
- """
-
@test.idempotent_id('b920faf1-7b8a-4657-b9fe-9c4512bfb381')
@test.services('object_storage')
def test_swift_basic_ops(self):
+ """Test swift basic ops.
+
+ * get swift stat.
+ * create container.
+ * upload a file to the created container.
+ * list container's objects and assure that the uploaded file is
+ present.
+ * download the object and check the content
+ * delete object from container.
+ * list container's objects and assure that the deleted file is gone.
+ * delete a container.
+ """
self.get_swift_stat()
container_name = self.create_container()
obj_name, obj_data = self.upload_object_to_container(container_name)
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index e031ff7..c66128d 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -119,14 +119,13 @@
@test.services('compute', 'network')
def test_server_basic_ops(self):
keypair = self.create_keypair()
- self.security_group = self._create_security_group()
- security_groups = [{'name': self.security_group['name']}]
+ security_group = self._create_security_group()
self.md = {'meta1': 'data1', 'meta2': 'data2', 'metaN': 'dataN'}
self.instance = self.create_server(
image_id=self.image_ref,
flavor=self.flavor_ref,
key_name=keypair['name'],
- security_groups=security_groups,
+ security_groups=[{'name': security_group['name']}],
config_drive=CONF.compute_feature_enabled.config_drive,
metadata=self.md,
wait_until='ACTIVE')
diff --git a/tempest/tests/lib/services/network/test_versions_client.py b/tempest/tests/lib/services/network/test_versions_client.py
index ae52c8a..026dc6d 100644
--- a/tempest/tests/lib/services/network/test_versions_client.py
+++ b/tempest/tests/lib/services/network/test_versions_client.py
@@ -35,10 +35,7 @@
"type": "text/html"
}
],
- "status": "CURRENT",
- "updated": "2013-07-23T11:33:21Z",
- "version": "2.0",
- "min_version": "2.0"
+ "status": "CURRENT"
}
}