From eeb7282921359feb7cbb94a118a858ee5ed9a32a Mon Sep 17 00:00:00 2001 From: ruffsl Date: Thu, 30 Apr 2020 22:33:37 -0700 Subject: [PATCH] Update generate_policy tests --- .../sros2/commands/security/verbs/test_generate_policy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sros2/test/sros2/commands/security/verbs/test_generate_policy.py b/sros2/test/sros2/commands/security/verbs/test_generate_policy.py index 56d58020..60cbe128 100644 --- a/sros2/test/sros2/commands/security/verbs/test_generate_policy.py +++ b/sros2/test/sros2/commands/security/verbs/test_generate_policy.py @@ -47,7 +47,7 @@ def test_generate_policy_topics(): # Load the policy and pull out the allowed publications and subscriptions policy = load_policy(os.path.join(tmpdir, 'test-policy.xml')) profile = policy.find( - path='profiles/profile[@ns="/"][@node="test_generate_policy_topics_node"]') + path='enclaves/enclave[@path="/"]/profiles/profile[@ns="/"][@node="test_generate_policy_topics_node"]') assert profile is not None topics_publish_allowed = profile.find(path='topics[@publish="ALLOW"]') assert topics_publish_allowed is not None @@ -88,7 +88,7 @@ def test_generate_policy_services(): # Load the policy and pull out allowed replies and requests policy = load_policy(os.path.join(tmpdir, 'test-policy.xml')) profile = policy.find( - path='profiles/profile[@ns="/"][@node="test_generate_policy_services_node"]') + path='enclaves/enclave[@path="/"]/profiles/profile[@ns="/"][@node="test_generate_policy_services_node"]') assert profile is not None service_reply_allowed = profile.find(path='services[@reply="ALLOW"]') assert service_reply_allowed is not None