add detaches to attachment test
The current test does 2 attaches, but if there is a
problem in detach, the test will still report
success.
This change adds detaches to the test so that
any detach failures are caught.
Change-Id: I44ee6dc5cb1ca79a4729cff41e5213b358eeb399
Closes-Bug: #1709909
diff --git a/tempest/api/compute/volumes/test_attach_volume.py b/tempest/api/compute/volumes/test_attach_volume.py
index 502bc1b..c56d140 100644
--- a/tempest/api/compute/volumes/test_attach_volume.py
+++ b/tempest/api/compute/volumes/test_attach_volume.py
@@ -143,6 +143,10 @@
self.assertEqual(server['id'], body['serverId'])
self.assertEqual(attachment['volumeId'], body['volumeId'])
self.assertEqual(attachment['id'], body['id'])
+ self.servers_client.detach_volume(server['id'],
+ attachment['volumeId'])
+ waiters.wait_for_volume_resource_status(
+ self.volumes_client, attachment['volumeId'], 'available')
class AttachVolumeShelveTestJSON(AttachVolumeTestJSON):