Remove redundant assert judgement
The assert judgement after wait_for_qos_operations is redundant,
because the same judgement already exists in wait_for_qos_operations,
and so the latter assert judgement will never fail(an exception will
be thrown in wait_for_qos_operations if anything is wrong). so
this is to remove the redundant judgement.
Change-Id: Ia172b1747242307e0cf92941dacee5b9144852f3
diff --git a/tempest/api/volume/admin/test_qos.py b/tempest/api/volume/admin/test_qos.py
index 9f2d453..9275d2b 100644
--- a/tempest/api/volume/admin/test_qos.py
+++ b/tempest/api/volume/admin/test_qos.py
@@ -55,16 +55,6 @@
self.admin_volume_qos_client.associate_qos(
self.created_qos['id'], vol_type_id)
- def _test_get_association_qos(self):
- body = self.admin_volume_qos_client.show_association_qos(
- self.created_qos['id'])['qos_associations']
-
- associations = []
- for association in body:
- associations.append(association['id'])
-
- return associations
-
@test.idempotent_id('7e15f883-4bef-49a9-95eb-f94209a1ced1')
def test_create_delete_qos_with_front_end_consumer(self):
"""Tests the creation and deletion of QoS specs
@@ -147,8 +137,9 @@
self._test_associate_qos(vol_type[i]['id'])
# get the association of the qos-specs
- associations = self._test_get_association_qos()
-
+ body = self.admin_volume_qos_client.show_association_qos(
+ self.created_qos['id'])['qos_associations']
+ associations = [association['id'] for association in body]
for i in range(0, 3):
self.assertIn(vol_type[i]['id'], associations)
@@ -159,8 +150,6 @@
waiters.wait_for_qos_operations(self.admin_volume_qos_client,
self.created_qos['id'], operation,
vol_type[0]['id'])
- associations = self._test_get_association_qos()
- self.assertNotIn(vol_type[0]['id'], associations)
# disassociate all volume-types from qos-specs
self.admin_volume_qos_client.disassociate_all_qos(
@@ -168,8 +157,6 @@
operation = 'disassociate-all'
waiters.wait_for_qos_operations(self.admin_volume_qos_client,
self.created_qos['id'], operation)
- associations = self._test_get_association_qos()
- self.assertEmpty(associations)
class QosSpecsV1TestJSON(QosSpecsV2TestJSON):