Skip to content

Commit 8ca2091

Browse files
committed
Add operation handler unit tests
1 parent 9a79c03 commit 8ca2091

2 files changed

Lines changed: 507 additions & 0 deletions

File tree

src/ros2_medkit_gateway/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ set(GATEWAY_VERSION "${CMAKE_MATCH_1}")
3434
# Find dependencies
3535
find_package(ament_cmake REQUIRED)
3636
find_package(rclcpp REQUIRED)
37+
find_package(rclcpp_action REQUIRED)
3738
find_package(diagnostic_msgs REQUIRED)
39+
find_package(example_interfaces REQUIRED)
3840
find_package(std_msgs REQUIRED)
3941
find_package(std_srvs REQUIRED)
4042
find_package(sensor_msgs REQUIRED)
@@ -461,6 +463,12 @@ if(BUILD_TESTING)
461463
ament_add_gtest(test_health_handlers test/test_health_handlers.cpp)
462464
target_link_libraries(test_health_handlers gateway_lib)
463465

466+
# Add operation handler tests
467+
ament_add_gtest(test_operation_handlers test/test_operation_handlers.cpp)
468+
target_link_libraries(test_operation_handlers gateway_lib)
469+
medkit_target_dependencies(test_operation_handlers rclcpp rclcpp_action std_srvs example_interfaces)
470+
set_tests_properties(test_operation_handlers PROPERTIES ENVIRONMENT "ROS_DOMAIN_ID=69")
471+
464472
# Demo update backend plugin (.so for integration tests)
465473
add_library(test_update_backend MODULE
466474
test/demo_nodes/test_update_backend.cpp
@@ -589,6 +597,7 @@ if(BUILD_TESTING)
589597
test_data_handlers
590598
test_auth_handlers
591599
test_health_handlers
600+
test_operation_handlers
592601
test_plugin_loader
593602
test_plugin_manager
594603
test_log_manager

0 commit comments

Comments
 (0)