This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 3a7f7917a9 ldap: fixup query name parameter in itest (#5316)
3a7f7917a9 is described below

commit 3a7f7917a9e39de7769801372549fe3f32479f4b
Author: Alexandre Gallice <[email protected]>
AuthorDate: Tue Sep 19 09:13:14 2023 +0200

    ldap: fixup query name parameter in itest (#5316)
---
 .../org/apache/camel/quarkus/component/ldap/it/LdapResource.java  | 8 ++++----
 .../java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
 
b/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
index 73828a6c02..5b01ecbaef 100644
--- 
a/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
+++ 
b/integration-tests/ldap/src/main/java/org/apache/camel/quarkus/component/ldap/it/LdapResource.java
@@ -80,15 +80,15 @@ public class LdapResource {
     @Path("/search")
     @GET
     @Produces(MediaType.APPLICATION_JSON)
-    public Response search(@QueryParam("q") String q) throws Exception {
-        return Response.ok(searchByUid(q)).build();
+    public Response search(@QueryParam("ldapQuery") String ldapQuery) throws 
Exception {
+        return Response.ok(searchByUid(ldapQuery)).build();
     }
 
     @Path("/safeSearch")
     @GET
     @Produces(MediaType.APPLICATION_JSON)
-    public Response safeSearch(@QueryParam("q") String q) throws Exception {
-        return Response.ok(searchByUid(LdapHelper.escapeFilter(q))).build();
+    public Response safeSearch(@QueryParam("ldapQuery") String ldapQuery) 
throws Exception {
+        return 
Response.ok(searchByUid(LdapHelper.escapeFilter(ldapQuery))).build();
     }
 
     @SuppressWarnings("unchecked")
diff --git 
a/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
 
b/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
index 962ec3b7c7..dc8392ed42 100644
--- 
a/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
+++ 
b/integration-tests/ldap/src/test/java/org/apache/camel/quarkus/component/ldap/it/LdapTest.java
@@ -111,7 +111,7 @@ class LdapTest {
         TypeRef<List<Map<String, Object>>> typeRef = new TypeRef<>() {
         };
         List<Map<String, Object>> results = RestAssured.given()
-                .queryParam("q", "tcruise")
+                .queryParam("ldapQuery", "tcruise")
                 .get("/ldap/search")
                 .then()
                 .statusCode(200)
@@ -136,7 +136,7 @@ class LdapTest {
 
         // Verfiy that calling the unsafe endpoint with a wildcard returns 
multiple results.
         List<Map<String, Object>> results = RestAssured.given()
-                .queryParam("q", "test*")
+                .queryParam("ldapQuery", "test*")
                 .get("/ldap/search")
                 .then()
                 .statusCode(200)
@@ -147,7 +147,7 @@ class LdapTest {
 
         // Verify that the same query passed to the safeSearch returns no 
matching results.
         results = RestAssured.given()
-                .queryParam("q", "test*")
+                .queryParam("ldapQuery", "test*")
                 .get("/ldap/safeSearch")
                 .then()
                 .statusCode(200)
@@ -156,7 +156,7 @@ class LdapTest {
 
         // Verify that non-escaped queries also work with escaped search
         results = RestAssured.given()
-                .queryParam("q", "test1")
+                .queryParam("ldapQuery", "test1")
                 .get("/ldap/safeSearch")
                 .then()
                 .statusCode(200)

Reply via email to