From 167a5784ca42ddb225726f0b792c855a4efafc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ollivier?= Date: Tue, 18 Feb 2020 07:42:30 +0100 Subject: [PATCH] Protect vs unordered results in TrunkTestInheritJSONBase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes-Bug: #1863707 Change-Id: If99de32925da9f79ceacdccc86c5727e466347c0 Signed-off-by: Cédric Ollivier --- neutron_tempest_plugin/api/test_trunk.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neutron_tempest_plugin/api/test_trunk.py b/neutron_tempest_plugin/api/test_trunk.py index 823a95d8..1f83bd87 100644 --- a/neutron_tempest_plugin/api/test_trunk.py +++ b/neutron_tempest_plugin/api/test_trunk.py @@ -235,7 +235,9 @@ class TrunkTestInheritJSONBase(TrunkTestJSONBase): 'segmentation_id': segmentation_id2}] # Validate that subport got segmentation details from the network - self.assertEqual(expected_subports, trunk['sub_ports']) + self.assertEqual( + sorted(expected_subports, key=lambda subport: subport['port_id']), + sorted(trunk['sub_ports'], key=lambda subport: subport['port_id'])) class TrunkTestMtusJSONBase(TrunkTestJSONBase):