Skip to content
Merged
Changes from 1 commit
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
46 changes: 23 additions & 23 deletions tests/generic_config_updater/test_eth_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,29 @@ def test_remove_lanes(duthost, ensure_dut_readiness):
delete_tmpfile(duthost, tmpfile)


def test_replace_lanes(duthost, ensure_dut_readiness):
cur_lanes = check_interface_status(duthost, "Lanes")
cur_lanes = cur_lanes.split(",")
cur_lanes.sort()
update_lanes = cur_lanes
update_lanes[-1] = str(int(update_lanes[-1]) + 1)
update_lanes = ",".join(update_lanes)
json_patch = [
{
"op": "replace",
"path": "/PORT/Ethernet0/lanes",
"value": "{}".format(update_lanes)
}
]

tmpfile = generate_tmpfile(duthost)
logger.info("tmpfile {}".format(tmpfile))

try:
output = apply_patch(duthost, json_data=json_patch, dest_file=tmpfile)
expect_op_failure(output)
finally:
delete_tmpfile(duthost, tmpfile)
#def test_replace_lanes(duthost, ensure_dut_readiness):
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_replace_lanes

Could you use @pytest.mark.skip(reason="...") and provide a reason?

Currently I could not understand the motivation from your PR description. #Closed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

# cur_lanes = check_interface_status(duthost, "Lanes")
# cur_lanes = cur_lanes.split(",")
# cur_lanes.sort()
# update_lanes = cur_lanes
# update_lanes[-1] = str(int(update_lanes[-1]) + 1)
# update_lanes = ",".join(update_lanes)
# json_patch = [
# {
# "op": "replace",
# "path": "/PORT/Ethernet0/lanes",
# "value": "{}".format(update_lanes)
# }
# ]
#
# tmpfile = generate_tmpfile(duthost)
# logger.info("tmpfile {}".format(tmpfile))
#
# try:
# output = apply_patch(duthost, json_data=json_patch, dest_file=tmpfile)
# expect_op_failure(output)
# finally:
# delete_tmpfile(duthost, tmpfile)

def test_replace_mtu(duthost, ensure_dut_readiness):
# Can't directly change mtu of the port channel member
Expand Down