Skip to content

Commit

Permalink
Revert changes on RM tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl committed Feb 1, 2024
1 parent 760c0df commit e5056e5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hardware_interface_testing/test/test_resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,17 @@ TEST_F(ResourceManagerTest, test_unitilizable_hardware_validation)
// If the the hardware can not be initialized and load_urdf tried to validate the interfaces a
// runtime exception is thrown
TestableResourceManager rm;
EXPECT_FALSE(rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, true));
ASSERT_THROW(
rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, true),
std::runtime_error);
}

TEST_F(ResourceManagerTest, test_unitilizable_hardware_no_validation)
{
// If the the hardware can not be initialized and load_urdf didn't try to validate the interfaces,
// the interface should not show up
TestableResourceManager rm;
EXPECT_TRUE(rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, false));
EXPECT_NO_THROW(rm.load_urdf(ros2_control_test_assets::minimal_unitilizable_robot_urdf, false));

// test actuator
EXPECT_FALSE(rm.state_interface_exists("joint1/position"));
Expand Down

0 comments on commit e5056e5

Please sign in to comment.