Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
  • Loading branch information
arlakshm committed May 19, 2022
1 parent c31c610 commit 81a5733
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 37 deletions.
46 changes: 20 additions & 26 deletions src/sonic-config-engine/tests/test_cfggen.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,19 +897,16 @@ def test_minigraph_voq_inband_port(self):
output_dict = utils.to_dict(output.strip())
self.assertDictEqual(
output_dict['Ethernet-IB0'], {
'admin_status': 'up',
'alias': 'Recirc0/1',
'coreId': '1',
'corePortId': '222',
'description': 'Recirc0/1',
'index': '52',
'lanes': '222',
'mtu': '9100',
'numVoq': '8',
'pfc_asym': 'off',
'role': 'Inb',
'speed': '400000',
'tpid': '0x8100'
"lanes": "222",
"alias": "Recirc0/1",
"index": "52",
"role": "Inb",
"speed": "400000",
"description": "Recirc0/1",
"mtu": "9100",
"tpid": "0x8100",
"pfc_asym": "off",
"admin_status": "up"
})

def test_minigraph_voq_recirc_ports(self):
Expand All @@ -918,19 +915,16 @@ def test_minigraph_voq_recirc_ports(self):
output_dict = utils.to_dict(output.strip())
self.assertDictEqual(
output_dict['Ethernet-Rec0'], {
'alias': 'Recirc0/0',
'coreId': '0',
'corePortId': '221',
'description': 'Recirc0/0',
'index': '51',
'lanes': '221',
'mtu': '9100',
'numVoq': '8',
'pfc_asym': 'off',
'role': 'Rec',
'speed': '400000',
'tpid': '0x8100',
'admin_status': 'up'
"lanes": "221",
"alias": "Recirc0/0",
"index": "51",
"role": "Rec",
"speed": "400000",
"description": "Recirc0/0",
"mtu": "9100",
"tpid": "0x8100",
"pfc_asym": "off",
"admin_status": "up"
})

def test_minigraph_dhcp(self):
Expand Down
22 changes: 11 additions & 11 deletions src/sonic-config-engine/tests/voq-sample-port-config.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# name lanes alias index role speed coreId corePortId numVoq
Ethernet0 6,7 Ethernet1/1 1 Ext 100000 0 1 8
Ethernet4 2,3 Ethernet2/1 2 Ext 100000 0 2 8
Ethernet8 4,5 Ethernet3/1 3 Ext 100000 0 3 8
Ethernet12 0,1 Ethernet4/1 4 Ext 100000 0 4 8
Ethernet16 14,15 Ethernet5/1 5 Ext 100000 0 5 8
Ethernet20 10,11 Ethernet6/1 6 Ext 100000 0 6 8
Ethernet24 12,13 Ethernet7/1 7 Ext 100000 0 7 8
Ethernet28 8,9 Ethernet8/1 8 Ext 100000 0 8 8
Ethernet-Rec0 221 Recirc0/0 51 Rec 400000 0 221 8
Ethernet-IB0 222 Recirc0/1 52 Inb 400000 1 222 8
# name lanes alias index role speed
Ethernet0 6,7 Ethernet1/1 1 Ext 100000
Ethernet4 2,3 Ethernet2/1 2 Ext 100000
Ethernet12 0,1 Ethernet4/1 4 Ext 100000
Ethernet8 4,5 Ethernet3/1 3 Ext 100000
Ethernet16 14,15 Ethernet5/1 5 Ext 100000
Ethernet20 10,11 Ethernet6/1 6 Ext 100000
Ethernet24 12,13 Ethernet7/1 7 Ext 100000
Ethernet28 8,9 Ethernet8/1 8 Ext 100000
Ethernet-Rec0 221 Recirc0/0 51 Rec 400000
Ethernet-IB0 222 Recirc0/1 52 Inb 400000

0 comments on commit 81a5733

Please sign in to comment.