[Nexthop][fboss2] Remove redundant ConfigSessionRestartTest#1202
Closed
hillol-nexthop wants to merge 1 commit into
Closed
[Nexthop][fboss2] Remove redundant ConfigSessionRestartTest#1202hillol-nexthop wants to merge 1 commit into
hillol-nexthop wants to merge 1 commit into
Conversation
Port upstream removal of fboss/cli/fboss2/test/integration_test/ ConfigSessionRestartTest.cpp and its references (cmake and BUCK file lists) from facebook#1095. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Closed
3 tasks
Contributor
|
@joseph5wu has imported this pull request. If you are a Meta employee, you can view this in D105598823. |
Contributor
|
@joseph5wu merged this pull request in 6a22d64. |
meta-codesync Bot
pushed a commit
that referenced
this pull request
May 21, 2026
…#1179) Summary: **Pre-submission checklist** - [x] 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` - [x] `pre-commit run` `fboss2-dev config interface <name> switchport access vlan <id>` blindly wrote `ingressVlan` on the port and rewrote the matching `vlanPorts` entry without checking that the target VLAN existed in `config.sw()->vlans()`. The CLI then printed `Config session committed successfully` and triggered a warmboot; `fboss_sw_agent` SIGABRTed during initialization with: ``` switch initialization failed: VLAN <id> has no interface, even when corresp port <port> is enabled ``` Validate that the VLAN exists up front in `queryClient()` and throw `std::invalid_argument` with a descriptive message before touching the config or saving. - `CmdConfigInterfaceSwitchportAccessVlan.cpp`: pre-flight check for VLAN existence. - `CmdConfigInterfaceSwitchportAccessVlanTest.cpp`: fixture now seeds `sw.vlans`; added a negative test for the rejection path and assert the running config is unchanged after the throw. Note: the redundant `ConfigSessionRestartTest` removal that previously rode along with this PR has been split out into #1202. Pull Request resolved: #1179 Test Plan: - [x] Unit tests: `queryClientThrowsWhenVlanDoesNotExist`, plus updated positive case still passes against the seeded VLAN. Reviewed By: Scott8440 Differential Revision: D105998364 Pulled By: joseph5wu fbshipit-source-id: 3f2ac3eb3ade5e34f828c0c79e036669e21f650a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove
fboss/cli/fboss2/test/integration_test/ConfigSessionRestartTest.cppand its references in the cmake and BUCK file lists. This test is redundant — feature-specific integration tests (e.g. the switchport access vlan test) exercise the same config-session restart path.Split out from #1179 so the cleanup can land independently of the VLAN validation change.
cmake/CliFboss2TestIntegrationTest.cmake: drop entry.fboss/cli/fboss2/test/integration_test/BUCK: drop entry.fboss/cli/fboss2/test/integration_test/ConfigSessionRestartTest.cpp: delete.Test plan
pre-commit run