Skip to content

Commit

Permalink
ut
Browse files Browse the repository at this point in the history
  • Loading branch information
zjswhhh committed Dec 6, 2024
1 parent ca69052 commit 7b4ea94
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/LinkManagerStateMachineActiveActiveTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,29 @@ TEST_F(LinkManagerStateMachineActiveActiveTest, MuxActiveConfigStandby)
VALIDATE_STATE(Active, Active, Up);
}

TEST_F(LinkManagerStateMachineActiveActiveTest, ConfigStandbySocAgentRestart)
{
setMuxActive();

handleMuxConfig("standby", 1);
EXPECT_EQ(mDbInterfacePtr->mSetMuxStateInvokeCount, 2);
EXPECT_EQ(mDbInterfacePtr->mLastSetMuxState, mux_state::MuxState::Label::Standby);
VALIDATE_STATE(Active, Standby, Up);

handleMuxState("standby", 3);
VALIDATE_STATE(Active, Standby, Up);

handleMuxState("active", 3);
VALIDATE_STATE(Active, Standby, Up);
EXPECT_EQ(mDbInterfacePtr->mSetMuxStateInvokeCount, 3);

handleMuxConfig("auto", 1);
EXPECT_EQ(mDbInterfacePtr->mSetMuxStateInvokeCount, 4);
EXPECT_EQ(mDbInterfacePtr->mLastSetMuxState, mux_state::MuxState::Label::Active);
VALIDATE_STATE(Active, Active, Up);
}


TEST_F(LinkManagerStateMachineActiveActiveTest, MuxActiveLinkProberPeerActive)
{
setMuxActive();
Expand Down

0 comments on commit 7b4ea94

Please sign in to comment.