diff options
author | Dan Smith <dansmith@redhat.com> | 2023-02-22 07:59:16 -0800 |
---|---|---|
committer | Dan Smith <dansmith@redhat.com> | 2023-02-22 09:25:41 -0800 |
commit | d2d34f5017042c7bfa5a5f60776481501bef4101 (patch) | |
tree | 336e4c72e235f436af7943acbe38de81a63bb922 | |
parent | aeacd8c92a5d18775c3611908e5605f1e470ed4a (diff) | |
download | tempest-d2d34f5017042c7bfa5a5f60776481501bef4101.tar.gz |
Change order of server/volume in snapshot test
This changes the order in which we create our test server and our test
volume in test_snapshot_create_delete_with_volume_in_use() to better
enable us to allow server deletion to detach the volume without hanging
on the guest.
Change-Id: Ia40ddacc5d5de3a57d19c4d60a65ba9bdc7c943d
Related-Bug: #1939108
-rw-r--r-- | tempest/api/volume/test_volumes_snapshots.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py index b3a04f8e1..c6cef69f2 100644 --- a/tempest/api/volume/test_volumes_snapshots.py +++ b/tempest/api/volume/test_volumes_snapshots.py @@ -44,11 +44,13 @@ class VolumesSnapshotTestJSON(base.BaseVolumeTest): @utils.services('compute') def test_snapshot_create_delete_with_volume_in_use(self): """Test create/delete snapshot from volume attached to server""" - # Create a test instance - server = self.create_server(wait_until='SSHABLE') # NOTE(zhufl) Here we create volume from self.image_ref for adding # coverage for "creating snapshot from non-blank volume". volume = self.create_volume(imageRef=self.image_ref) + + # Create a test instance + server = self.create_server(wait_until='SSHABLE') + self.attach_volume(server['id'], volume['id']) # Snapshot a volume which attached to an instance with force=False |