From bc9cb759fd75bf9093f7856eb4dce01e332fd2e7 Mon Sep 17 00:00:00 2001 From: Daniel Bacher Date: Thu, 5 Nov 2020 13:43:58 +0100 Subject: [PATCH] add test case get_lldp_neighbors_detail for sg300-10 --- .../SG300-10/show_lldp_neighbors.txt | 11 ++++++++ .../SG300-10/expected_result.json | 20 ++++++++++++++ .../SG300-10/show_lldp_neighbors.txt | 9 +++++++ .../SG300-10/show_lldp_neighbors_gi7.txt | 27 +++++++++++++++++++ 4 files changed, 67 insertions(+) create mode 100644 test/unit/mocked_data/SG300-10/show_lldp_neighbors.txt create mode 100644 test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/expected_result.json create mode 100644 test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors.txt create mode 100644 test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors_gi7.txt diff --git a/test/unit/mocked_data/SG300-10/show_lldp_neighbors.txt b/test/unit/mocked_data/SG300-10/show_lldp_neighbors.txt new file mode 100644 index 0000000..31fc656 --- /dev/null +++ b/test/unit/mocked_data/SG300-10/show_lldp_neighbors.txt @@ -0,0 +1,11 @@ + +System capability legend: +B - Bridge; R - Router; W - Wlan Access Point; T - telephone; +D - DOCSIS Cable Device; H - Host; r - Repeater; +TP - Two Ports MAC Relay; S - S-VLAN; C - C-VLAN; O - Other + + Port Device ID Port ID System Name Capabilities TTL +--------- ----------------- ------------- ----------------- ------------ ----- +gi7 00:a5:bf:ff:ee:dd gi8 switchcffeedd B, R 96 +gi8 f2:18:98:aa:bb:cc 9c:eb:e8:c3:b test-pc1 B, W 118 + 2:a1 diff --git a/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/expected_result.json b/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/expected_result.json new file mode 100644 index 0000000..eae9be1 --- /dev/null +++ b/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/expected_result.json @@ -0,0 +1,20 @@ +{ + "gi7": [ + { + "parent_interface": "N/A", + "remote_chassis_id": "00:a5:bf:ff:ee:dd", + "remote_port": "gi8", + "remote_port_description": "", + "remote_system_capab": [ + "B", + "R" + ], + "remote_system_description": "", + "remote_system_enable_capab": [ + "B", + "R" + ], + "remote_system_name": "switchcffeedd" + } + ] +} diff --git a/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors.txt b/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors.txt new file mode 100644 index 0000000..e62ef21 --- /dev/null +++ b/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors.txt @@ -0,0 +1,9 @@ + +System capability legend: +B - Bridge; R - Router; W - Wlan Access Point; T - telephone; +D - DOCSIS Cable Device; H - Host; r - Repeater; +TP - Two Ports MAC Relay; S - S-VLAN; C - C-VLAN; O - Other + + Port Device ID Port ID System Name Capabilities TTL +--------- ----------------- ------------- ----------------- ------------ ----- +gi7 00:a5:bf:ff:ee:dd gi8 switchcffeedd B, R 96 diff --git a/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors_gi7.txt b/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors_gi7.txt new file mode 100644 index 0000000..a62ba0b --- /dev/null +++ b/test/unit/mocked_data/test_get_lldp_neighbors_detail/SG300-10/show_lldp_neighbors_gi7.txt @@ -0,0 +1,27 @@ + +Device ID: 00:a5:bf:ff:ee:dd +Port ID: gi8 +Capabilities: Bridge, Router +System Name: switchcffeedd +System description: +Port description: +Management Address: 192.168.1.253 +Management Address: 254.128.0.0.0.0 +Time To Live: 118 + + +802.3 EEE: + +17 +17 +17 +17 + + +802.1 PVID: 1 +802.1 PPVID: +802.1 VLAN: +802.1 Protocol: + + +