summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormelanie witt <melwittt@gmail.com>2018-10-04 23:47:12 +0000
committermelanie witt <melwittt@gmail.com>2018-10-04 23:56:09 +0000
commite935d35956f43d43309ebd67935631c2800479b7 (patch)
tree655eec11cbfcffae045ce63b98e24adf6d0c2790
parent9540ed07abc346e1174e40a9e1ad12cf274c04db (diff)
downloadcinder-tempest-plugin-e935d35956f43d43309ebd67935631c2800479b7.zip
cinder-tempest-plugin-e935d35956f43d43309ebd67935631c2800479b7.tar.gz
cinder-tempest-plugin-e935d35956f43d43309ebd67935631c2800479b7.tar.bz2
GET backup before asserting 'volume_id' and 'snapshot_id'
Recently, commit c96757b275a77a745c6c80947bdd0bcb2de7eefd was merged to remove redundant cleanups in volume backup tests. But there was a bug in the change that assumed 'volume_id' and 'snapshot_id' are returned from the backup create API when they are not. We need to GET the backup in the API in order to obtain the 'volume_id' and 'snapshot_id' for the asserts. Closes-Bug: #1796207 Change-Id: I640fe41ec6049bfd980dfcbb6cae95a9a3e97b66
-rw-r--r--cinder_tempest_plugin/api/volume/test_volume_backup.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cinder_tempest_plugin/api/volume/test_volume_backup.py b/cinder_tempest_plugin/api/volume/test_volume_backup.py
index 8c81543..3547d71 100644
--- a/cinder_tempest_plugin/api/volume/test_volume_backup.py
+++ b/cinder_tempest_plugin/api/volume/test_volume_backup.py
@@ -41,6 +41,9 @@ class VolumesBackupsTest(base.BaseVolumeTest):
backup = self.create_backup(
volume_id=volume['id'],
snapshot_id=snapshot['id'])
+ # Get a given backup. We need to do this to get the volume_id and
+ # snapshot_id of the backup. They are not returned by the create API.
+ backup = self.backups_client.show_backup(backup['id'])['backup']
self.assertEqual(volume['id'], backup['volume_id'])
self.assertEqual(snapshot['id'], backup['snapshot_id'])

This mirror site include all the OpenStack related repositories under: openstack, openstack-dev and openstack-infra.

NOTE: All repositories are updated every one hour.

Usage

For Git Clone
 git clone http://git.trystack.cn/openstack/nova.git 
For DevStack

Add GIT_BASE, NOVNC_REPO and SPICE_REPO variables to local.conf file.

[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git