Skip to content

Commit

Permalink
Add BcmSwitch tests commit and save fwd pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Dscano committed Aug 15, 2022
1 parent 3f20ea7 commit b7c3a99
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions stratum/hal/lib/bcm/bcm_switch_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,28 @@ TEST_F(BcmSwitchTest, PushChassisConfigFailureWhenNodePushFails) {
DerivedFromStatus(DefaultError()));
}

TEST_F(BcmSwitchTest, SaveForwardingPipelineConfig) {
const ::p4::v1::ForwardingPipelineConfig config;
::util::Status status =
bcm_switch_->SaveForwardingPipelineConfig(kNodeId, config);
ASSERT_FALSE(status.ok());
EXPECT_EQ(ERR_UNIMPLEMENTED, status.error_code());
EXPECT_THAT(
status.error_message(),
HasSubstr(
"SaveForwardingPipelineConfig not implemented for this target"));
}

TEST_F(BcmSwitchTest, CommitForwardingPipelineConfig) {
::util::Status status = bcm_switch_->CommitForwardingPipelineConfig(kNodeId);
ASSERT_FALSE(status.ok());
EXPECT_EQ(ERR_UNIMPLEMENTED, status.error_code());
EXPECT_THAT(
status.error_message(),
HasSubstr(
"CommitForwardingPipelineConfig not implemented for this target"));
}

TEST_F(BcmSwitchTest, VerifyChassisConfigSuccess) {
ChassisConfig config;
config.add_nodes()->set_id(kNodeId);
Expand Down

0 comments on commit b7c3a99

Please sign in to comment.