Skip to content

Conversation

@benoit-nexthop
Copy link
Contributor

@benoit-nexthop benoit-nexthop commented Jan 7, 2026

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Add end-to-end tests to be run on an FBOSS DUT to validate CLI commands.

Note: this change is part of a series, the previous one is #761, the next one is #789.

Test Plan

New end-to-end test coverage for fboss2-dev config interface <name> mtu <N> and fboss2-dev config interface <name> description <string>

Sample output of run_test.py cli:

Setting fboss environment variables
Running CLI end-to-end tests...

########## Running CLI test: test_config_interface_description.py
[  PASSED  ] test_config_interface_description.py (84.0s)

########## Running CLI test: test_config_interface_mtu.py
[  PASSED  ] test_config_interface_mtu.py (71.8s)

============================================================
CLI Test Summary
============================================================
  Passed: 2
  Failed: 0
  Total:  2
  Time:   155.8s

Detailed output of each test suite:

============================================================
CLI E2E Test: config interface <name> description <string>
============================================================

[Step 1] Finding an interface to test...
  Using CLI from FBOSS_CLI_PATH: /home/admin/benoit/fboss2-dev
[CLI] Running: show interface
[CLI] Completed in 18.14s: show interface
  Using interface: eth1/1/1 (VLAN: 2001)

[Step 2] Getting current description...
[CLI] Running: show interface eth1/1/1
[CLI] Completed in 17.78s: show interface eth1/1/1
  Current description: 'Test revision 2'

[Step 3] Setting description to 'CLI_E2E_TEST_DESCRIPTION'...
[CLI] Running: config interface eth1/1/1 description CLI_E2E_TEST_DESCRIPTION
[CLI] Completed in 0.06s: config interface eth1/1/1 description CLI_E2E_TEST_DESCRIPTION
[CLI] Running: config session commit
[CLI] Completed in 7.43s: config session commit
  Description set to 'CLI_E2E_TEST_DESCRIPTION'

[Step 4] Verifying description via 'show interface'...
[CLI] Running: show interface eth1/1/1
[CLI] Completed in 21.38s: show interface eth1/1/1
  Verified: Description is 'CLI_E2E_TEST_DESCRIPTION'

[Step 5] Restoring original description ('Test revision 2')...
[CLI] Running: config interface eth1/1/1 description Test revision 2
[CLI] Completed in 0.05s: config interface eth1/1/1 description Test revision 2
[CLI] Running: config session commit
[CLI] Completed in 6.34s: config session commit
  Restored description to 'Test revision 2'
[CLI] Running: show interface eth1/1/1
[CLI] Completed in 19.31s: show interface eth1/1/1

============================================================
TEST PASSED
============================================================
============================================================
CLI E2E Test: config interface <name> mtu <N>
============================================================

[Step 1] Finding an interface to test...
  Using CLI from FBOSS_CLI_PATH: /home/admin/benoit/fboss2-dev
[CLI] Running: show interface
[CLI] Completed in 21.35s: show interface
  Using interface: eth1/1/1 (VLAN: 2001)

[Step 2] Getting current MTU...
[CLI] Running: show interface eth1/1/1
[CLI] Completed in 19.47s: show interface eth1/1/1
  Current MTU: 9000

[Step 3] Setting MTU to 1500...
[CLI] Running: config interface eth1/1/1 mtu 1500
[CLI] Completed in 0.06s: config interface eth1/1/1 mtu 1500
[CLI] Running: config session commit
[CLI] Completed in 6.52s: config session commit
  MTU set to 1500

[Step 4] Verifying MTU via 'show interface'...
[CLI] Running: show interface eth1/1/1
[CLI] Completed in 19.33s: show interface eth1/1/1
  Verified: MTU is 1500

[Step 5] Verifying kernel interface MTU...
Running: ip link show fboss2001
  Verified: Kernel interface fboss2001 has MTU 1500

[Step 6] Restoring original MTU (9000)...
[CLI] Running: config interface eth1/1/1 mtu 9000
[CLI] Completed in 0.05s: config interface eth1/1/1 mtu 9000
[CLI] Running: config session commit
[CLI] Completed in 5.60s: config session commit
  Restored MTU to 9000

============================================================
TEST PASSED
============================================================

@benoit-nexthop benoit-nexthop force-pushed the fboss2-cli-prototype_part10 branch 2 times, most recently from 40112a0 to c6c7004 Compare January 14, 2026 21:29
@benoit-nexthop benoit-nexthop force-pushed the fboss2-cli-prototype_part10 branch from c6c7004 to 96c09a3 Compare January 15, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant