From b2218e3783479b76873344b80ed4bca2b444be86 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Fri, 31 Oct 2025 12:10:13 -0700 Subject: [PATCH] Add a couple more LDAP schema tests Follow-up to #14850 These tests are to ensure that queries expressed as single-lines are parsed correctly. --- .../rabbitmq_auth_backend_ldap.snippets | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/deps/rabbitmq_auth_backend_ldap/test/config_schema_SUITE_data/rabbitmq_auth_backend_ldap.snippets b/deps/rabbitmq_auth_backend_ldap/test/config_schema_SUITE_data/rabbitmq_auth_backend_ldap.snippets index 3811a5d0b13..db2facaa8cb 100644 --- a/deps/rabbitmq_auth_backend_ldap/test/config_schema_SUITE_data/rabbitmq_auth_backend_ldap.snippets +++ b/deps/rabbitmq_auth_backend_ldap/test/config_schema_SUITE_data/rabbitmq_auth_backend_ldap.snippets @@ -361,6 +361,15 @@ ], [rabbitmq_auth_backend_ldap]}, + {vhost_access_query_single_line, + "auth_ldap.queries.vhost_access = {in_group,\"ou=${vhost}-users,ou=vhosts,dc=example,dc=com\"}", + [ + {rabbitmq_auth_backend_ldap, [ + {vhost_access_query, {in_group,"ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}} + ]} + ], + [rabbitmq_auth_backend_ldap]}, + {resource_access_query, "auth_ldap.queries.resource_access = ''' {for, [ @@ -394,6 +403,17 @@ ], [rabbitmq_auth_backend_ldap]}, + {resource_access_query_single_line, + "auth_ldap.queries.resource_access = {for, [{permission, configure, {constant, true}}]}", + [ + {rabbitmq_auth_backend_ldap, [ + {resource_access_query, + {for, [{permission, configure, {constant, true}}]} + } + ]} + ], + [rabbitmq_auth_backend_ldap]}, + {topic_access_query, "auth_ldap.queries.topic_access = ''' {for, [ @@ -413,6 +433,17 @@ ], [rabbitmq_auth_backend_ldap]}, + {topic_access_query_single_line, + "auth_ldap.queries.topic_access = {for, [{permission, write, {constant, true}}, {permission, read, {constant, true}}]}", + [ + {rabbitmq_auth_backend_ldap, [ + {topic_access_query, + {for, [{permission, write, {constant, true}}, {permission, read, {constant, true}}]} + } + ]} + ], + [rabbitmq_auth_backend_ldap]}, + {tag_queries, "auth_ldap.queries.tags = ''' [{administrator, {constant, false}},