Protect vs unordered results in TrunkTestInheritJSONBase

Closes-Bug: #1863707

Change-Id: If99de32925da9f79ceacdccc86c5727e466347c0
Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
This commit is contained in:
Cédric Ollivier 2020-02-18 07:42:30 +01:00
parent 22d7cc950b
commit 167a5784ca

View File

@ -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):