Skip to content

Commit

Permalink
add support for get_node_names_and_namespaces_with_enclaves (#501)
Browse files Browse the repository at this point in the history
Signed-off-by: Mikael Arguedas <[email protected]>
  • Loading branch information
mikaelarguedas authored May 1, 2020
1 parent abf8a62 commit b8baf07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ros2cli/ros2cli/daemon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def main(*, script_name='_ros2_daemon', argv=None):
_print_invoked_function_name(node.get_namespace))
server.register_function(
_print_invoked_function_name(node.get_node_names_and_namespaces))
server.register_function(
_print_invoked_function_name(node.get_node_names_and_namespaces_with_enclaves))
server.register_function(
_print_invoked_function_name(node.get_topic_names_and_types))
server.register_function(
Expand Down
6 changes: 6 additions & 0 deletions ros2cli/test/test_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

TEST_NODE_NAME = 'test_node'
TEST_NODE_NAMESPACE = '/test'
TEST_NODE_ENCLAVE = '/'
TEST_TOPIC_NAME = '/test/topic'
TEST_TOPIC_TYPE = 'test_msgs/msg/Empty'
TEST_TOPIC_PUBLISHER_QOS = rclpy.qos.QoSProfile(
Expand Down Expand Up @@ -124,6 +125,11 @@ def test_get_node_names_and_namespaces(daemon_node):
assert [TEST_NODE_NAME, TEST_NODE_NAMESPACE] in node_names_and_namespaces


def test_get_node_names_and_namespaces_with_enclaves(daemon_node):
node_names_and_namespaces = daemon_node.get_node_names_and_namespaces_with_enclaves()
assert [TEST_NODE_NAME, TEST_NODE_NAMESPACE, TEST_NODE_ENCLAVE] in node_names_and_namespaces


def test_get_topic_names_and_types(daemon_node):
topic_names_and_types = daemon_node.get_topic_names_and_types()
assert [TEST_TOPIC_NAME, [TEST_TOPIC_TYPE]] in topic_names_and_types
Expand Down

0 comments on commit b8baf07

Please sign in to comment.