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
diff --git a/tempest/api/volume/test_volumes_snapshots.py b/tempest/api/volume/test_volumes_snapshots.py
index b3a04f8..c6cef69 100644
--- a/tempest/api/volume/test_volumes_snapshots.py
+++ b/tempest/api/volume/test_volumes_snapshots.py
@@ -44,11 +44,13 @@
@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