From 4ab6e41d97d1a01baca437649d719076f79d41fc Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Thu, 15 Oct 2020 16:37:32 -0700 Subject: [PATCH] Add a test case for LLDP_LOC_CHASSIS.lldp_loc_man_addr has only one IPv6 address (#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 --- tests/mock_tables/asic0/appl_db.json | 2 +- tests/mock_tables/asic1/appl_db.json | 2 +- tests/mock_tables/asic2/appl_db.json | 2 +- tests/mock_tables/global_db/appl_db.json | 2 +- tests/namespace/test_lldp.py | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/mock_tables/asic0/appl_db.json b/tests/mock_tables/asic0/appl_db.json index 6307179d61a9..af2167338896 100644 --- a/tests/mock_tables/asic0/appl_db.json +++ b/tests/mock_tables/asic0/appl_db.json @@ -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", diff --git a/tests/mock_tables/asic1/appl_db.json b/tests/mock_tables/asic1/appl_db.json index 1306fc823083..3c03bcc12a3c 100644 --- a/tests/mock_tables/asic1/appl_db.json +++ b/tests/mock_tables/asic1/appl_db.json @@ -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", diff --git a/tests/mock_tables/asic2/appl_db.json b/tests/mock_tables/asic2/appl_db.json index 53bc761a784f..37aad20d620e 100644 --- a/tests/mock_tables/asic2/appl_db.json +++ b/tests/mock_tables/asic2/appl_db.json @@ -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", diff --git a/tests/mock_tables/global_db/appl_db.json b/tests/mock_tables/global_db/appl_db.json index 4ba0f7392f9d..56b306f5ace0 100644 --- a/tests/mock_tables/global_db/appl_db.json +++ b/tests/mock_tables/global_db/appl_db.json @@ -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" } } diff --git a/tests/namespace/test_lldp.py b/tests/namespace/test_lldp.py index 2272382b5e7a..ccdc1c35d563 100644 --- a/tests/namespace/test_lldp.py +++ b/tests/namespace/test_lldp.py @@ -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):