Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/generic_config_updater/test_eth_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ def test_replace_fec(duthosts, rand_one_dut_front_end_hostname, ensure_dut_readi
duthost = duthosts[rand_one_dut_front_end_hostname]
asic_namespace = None if enum_rand_one_frontend_asic_index is None else \
'asic{}'.format(enum_rand_one_frontend_asic_index)
namespace_prefix = '' if asic_namespace is None else '-n ' + asic_namespace
intf_init_status = duthost.get_interfaces_status()
port = get_ethernet_port_not_in_portchannel(duthost, namespace=asic_namespace)
json_patch = [
Expand All @@ -323,7 +324,7 @@ def test_replace_fec(duthosts, rand_one_dut_front_end_hostname, ensure_dut_readi

# The rollback after the test cannot revert the fec, when fec is not configured in config_db.json
if intf_init_status[port].get("fec", "N/A") == "N/A":
out = duthost.command("config interface fec {} none".format(port))
out = duthost.command("config interface {} fec {} none".format(namespace_prefix, port))
pytest_assert(out["rc"] == 0, "Failed to set {} fec to none. Error: {}".format(port, out["stderr"]))
else:
expect_op_failure(output)
Expand Down
Loading