Skip to content

Commit

Permalink
Fix different format mgmt ip for eth0 in test_lldp_syncd
Browse files Browse the repository at this point in the history
Fix case failure of Failed: lldp_rem_sys_cap_supported does not match for eth0
  • Loading branch information
nhe-NV committed Dec 12, 2024
1 parent 652987f commit 298e761
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/lldp/test_lldp_syncd.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,21 @@ def assert_lldp_entry_content(interface, entry_content, lldpctl_interface):
chassis_info.get("mgmt-ip", ""),
),
)

if interface == "eth0":
expected_sys_cap_supported_result = (
entry_content["lldp_rem_sys_cap_supported"] == "28 00"
or entry_content["lldp_rem_sys_cap_supported"] == "20 00",
)
else:
expected_sys_cap_supported_result = (
entry_content["lldp_rem_sys_cap_supported"] == "28 00"
)
pytest_assert(
entry_content["lldp_rem_sys_cap_supported"] == "28 00",
expected_sys_cap_supported_result,
"lldp_rem_sys_cap_supported does not match for {}".format(interface),
)

if interface == "eth0":
expected_sys_cap_enable_result = (
entry_content["lldp_rem_sys_cap_enabled"] == "28 00"
Expand Down

0 comments on commit 298e761

Please sign in to comment.