Skip to content

Commit

Permalink
Fix failing tests caused by new module type in latest APIC image
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Smith committed Jan 21, 2017
1 parent a8cd767 commit 67d5df7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/aciphysobject_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ def test_controller_children(self):
children_types.add(child.get_type())

self.assertEqual(len(children_types), 3)
self.assertIn('systemctrlcard', children_types)
self.assertTrue('systemctrlcard' in children_types or 'motherboard' in children_types)
self.assertIn('fantray', children_types)
self.assertIn('powersupply', children_types)

Expand Down Expand Up @@ -987,8 +987,9 @@ def test_populate_deep(self):
module_types.add(module.get_type())
if module.get_type() == 'linecard':
linecard = module

self.assertEqual(len(module_types ^ {'linecard', 'supervisor', 'powersupply', 'fantray'}), 0)
for known_type in ['linecard', 'supervisor', 'powersupply', 'fantray']:
module_types.discard(known_type)
self.assertEqual(len(module_types), 0)

interfaces = linecard.get_children()
for interface in interfaces:
Expand All @@ -1000,7 +1001,9 @@ def test_populate_deep(self):
module_types = set()
for module in modules:
module_types.add(module.get_type())
self.assertEqual(len(module_types ^ {'systemctrlcard', 'powersupply', 'fantray'}), 0)
for known_type in ['motherboard', 'systemctrlcard', 'powersupply', 'fantray', 'supervisor']:
module_types.discard(known_type)
self.assertEqual(len(module_types), 0)

links = pod.get_children(Link)
for link in links:
Expand Down

0 comments on commit 67d5df7

Please sign in to comment.