Skip to content

Commit

Permalink
Add a test case for LLDP_LOC_CHASSIS.lldp_loc_man_addr has only one I…
Browse files Browse the repository at this point in the history
…Pv6 address (sonic-net#167)

* Add a test case for LLDP_LOC_CHASSIS.lldp_loc_man_addr has only one IPv6 address
* Remove IPv4 on asicN namespace's appl_db
  • Loading branch information
qiluo-msft authored Oct 15, 2020
1 parent 764030a commit 4ab6e41
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/mock_tables/asic0/appl_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lldp_loc_sys_desc": "Gotta go Fast!",
"lldp_loc_sys_cap_enabled": "28 00",
"lldp_loc_sys_cap_supported": "28 00",
"lldp_loc_man_addr": "10.224.25.36,fe80::ce37:abff:feec:de9c"
"lldp_loc_man_addr": "fe80::ce37:abff:feec:de9c"
},
"PORT_TABLE:Ethernet0": {
"description": "snowflake",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic1/appl_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lldp_loc_sys_desc": "Gotta go Fast!",
"lldp_loc_sys_cap_enabled": "28 00",
"lldp_loc_sys_cap_supported": "28 00",
"lldp_loc_man_addr": "10.224.25.36,fe80::ce37:abff:feec:de9c"
"lldp_loc_man_addr": "fe80::ce37:abff:feec:de9c"
},
"PORT_TABLE:Ethernet8": {
"description": "snowflake",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/asic2/appl_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"lldp_loc_sys_desc": "Gotta go Fast!",
"lldp_loc_sys_cap_enabled": "28 00",
"lldp_loc_sys_cap_supported": "28 00",
"lldp_loc_man_addr": "10.224.25.36,fe80::ce37:abff:feec:de9c"
"lldp_loc_man_addr": "fe80::ce37:abff:feec:de9c"
},
"PORT_TABLE:Ethernet-BP16": {
"description": "backplane",
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_tables/global_db/appl_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"lldp_loc_sys_desc": "Gotta go Fast!",
"lldp_loc_sys_cap_enabled": "28 00",
"lldp_loc_sys_cap_supported": "28 00",
"lldp_loc_man_addr": "10.224.25.36,fe80::ce37:abff:feec:de9c"
"lldp_loc_man_addr": "fe80::ce37:abff:feec:de9c"
}
}
6 changes: 3 additions & 3 deletions tests/namespace/test_lldp.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def test_subtype_lldp_loc_man_addr_table(self):

response = get_pdu.make_response(self.lut)
value0 = response.values[0]
self.assertEqual(str(value0.name), str(ObjectIdentifier(13, 0, 1, 0, (1, 0, 8802, 1, 1, 2, 1, 3, 8, 1, 3, 1, 4, 10, 224, 25, 36))))
self.assertEqual(value0.type_, ValueType.INTEGER)
self.assertEqual(value0.data, 5)
self.assertEqual(str(value0.name), str(ObjectIdentifier(9, 0, 1, 0, (1, 0, 8802, 1, 1, 2, 1, 3, 8, 1, 3, 1, 4))))
self.assertEqual(value0.type_, ValueType.END_OF_MIB_VIEW)
self.assertEqual(value0.data, None)


def test_subtype_lldp_rem_man_addr_table(self):
Expand Down

0 comments on commit 4ab6e41

Please sign in to comment.