Skip to content

Commit

Permalink
added test for --activate-as-group option
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Oct 22, 2023
1 parent bc311d7 commit 91d5f21
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions controller_manager/test/test_spawner_unspawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ TEST_F(TestLoadController, multi_ctrls_test_type_in_param)
{
validate_loaded_controllers();
}

// Now unload everything and load them as a group in a single operation
EXPECT_EQ(call_unspawner("ctrl_1 ctrl_2 ctrl_3 -c test_controller_manager"), 0);
ASSERT_EQ(cm_->get_loaded_controllers().size(), 0ul) << "Controller should have been unloaded";
EXPECT_EQ(call_spawner("ctrl_1 ctrl_2 ctrl_3 -c test_controller_manager --activate-as-group"), 0);
ASSERT_EQ(cm_->get_loaded_controllers().size(), 3ul) << "Controller should have been loaded";
{
validate_loaded_controllers();
}
}

TEST_F(TestLoadController, spawner_test_type_in_arg)
Expand Down

0 comments on commit 91d5f21

Please sign in to comment.