Skip to content

Commit

Permalink
Update JSON fields in p4orch for latest SAI
Browse files Browse the repository at this point in the history
Signed-off-by: Saikrishna Arcot <[email protected]>
  • Loading branch information
saiarcot895 committed Oct 22, 2024
1 parent 0639f88 commit f014d65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions orchagent/p4orch/tests/wcmp_manager_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ TEST_F(WcmpManagerTest, WatchportStateChangetoOperDownSucceeds)
// Verify that the next hop member associated with the port is pruned.
std::string op = "port_state_change";
std::string data = "[{\"port_id\":\"oid:0x56789abcdff\",\"port_state\":\"SAI_PORT_OPER_"
"STATUS_DOWN\"}]";
"STATUS_DOWN\",\"port_error_status\":\"0\"}]";
EXPECT_CALL(mock_sai_next_hop_group_, remove_next_hop_group_member(Eq(kWcmpGroupMemberOid1)))
.WillOnce(Return(SAI_STATUS_SUCCESS));
HandlePortStatusChangeNotification(op, data);
Expand All @@ -2314,7 +2314,7 @@ TEST_F(WcmpManagerTest, WatchportStateChangeToOperUpSucceeds)
// restored.
std::string op = "port_state_change";
std::string data = "[{\"port_id\":\"oid:0x112233\",\"port_state\":\"SAI_PORT_OPER_"
"STATUS_UP\"}]";
"STATUS_UP\",\"port_error_status\":\"0\"}]";
EXPECT_CALL(mock_sai_next_hop_group_,
create_next_hop_group_member(_, Eq(gSwitchId), Eq(3),
Truly(std::bind(MatchSaiNextHopGroupMemberAttribute, kNexthopOid1, 2,
Expand All @@ -2339,7 +2339,7 @@ TEST_F(WcmpManagerTest, WatchportStateChangeFromOperUnknownToDownPrunesMemberOnl
// Verify that the pruned next hop member is not pruned again.
std::string op = "port_state_change";
std::string data = "[{\"port_id\":\"oid:0x56789abcfff\",\"port_state\":\"SAI_PORT_OPER_"
"STATUS_DOWN\"}]";
"STATUS_DOWN\",\"port_error_status\":\"0\"}]";
HandlePortStatusChangeNotification(op, data);
EXPECT_TRUE(VerifyWcmpGroupMemberInPortMap(app_db_entry.wcmp_group_members[0], true, 1));
EXPECT_TRUE(app_db_entry.wcmp_group_members[0]->pruned);
Expand Down

0 comments on commit f014d65

Please sign in to comment.