Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for get_node_names_and_namespaces_with_enclaves #501

Merged
merged 1 commit into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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