ilgrosso commented on code in PR #859: URL: https://github.com/apache/syncope/pull/859#discussion_r1800513996
########## fit/core-reference/src/test/java/org/apache/syncope/fit/core/UserIssuesITCase.java: ########## @@ -1820,4 +1822,21 @@ void issueSYNCOPE1818() { jdbcTemplate.update("DELETE FROM TESTPULL WHERE USERNAME = 'rossini'"); } } + + @Test + void issueSYNCOPE1830() { Review Comment: Please move this test method to `SearchITCase` and name it accordingly, e.g. `byMembershipAttribute()` or so ########## fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java: ########## @@ -253,4 +256,23 @@ public void issueSYNCOPE1472() { assertFalse(printer.getResources().contains(RESOURCE_NAME_DBSCRIPTED), "Should not contain removed resources"); assertFalse(printer.getAuxClasses().contains("csv"), "Should not contain removed auxiliary classes"); } + + @Test + void issueSYNCOPE1830() { + // search user by membership attribute + AnyObjectTO canonMf = ANY_OBJECT_SERVICE.read("8559d14d-58c2-46eb-a2d4-a7d35161e8f8"); + GroupTO otherchild = GROUP_SERVICE.read("otherchild"); + // add a membership and its plain attribute + updateAnyObject(new AnyObjectUR.Builder(canonMf.getKey()).memberships( + new MembershipUR.Builder(otherchild.getKey()).plainAttrs(attr("ctype", "otherchildctype")) + .build()).build()); + Awaitility.await().until(() -> ANY_OBJECT_SERVICE.search(new AnyQuery.Builder().page(1).size(10) Review Comment: Please convert `Awaitility.await()` as `await()` as the rest of the codebase ########## fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java: ########## @@ -253,4 +256,23 @@ public void issueSYNCOPE1472() { assertFalse(printer.getResources().contains(RESOURCE_NAME_DBSCRIPTED), "Should not contain removed resources"); assertFalse(printer.getAuxClasses().contains("csv"), "Should not contain removed auxiliary classes"); } + + @Test + void issueSYNCOPE1830() { Review Comment: Please move this test method to `SearchITCase` and name it accordingly, e.g. `byMembershipAttribute()` or so ########## fit/core-reference/src/test/java/org/apache/syncope/fit/core/AnyObjectITCase.java: ########## @@ -253,4 +256,23 @@ public void issueSYNCOPE1472() { assertFalse(printer.getResources().contains(RESOURCE_NAME_DBSCRIPTED), "Should not contain removed resources"); assertFalse(printer.getAuxClasses().contains("csv"), "Should not contain removed auxiliary classes"); } + + @Test + void issueSYNCOPE1830() { + // search user by membership attribute + AnyObjectTO canonMf = ANY_OBJECT_SERVICE.read("8559d14d-58c2-46eb-a2d4-a7d35161e8f8"); + GroupTO otherchild = GROUP_SERVICE.read("otherchild"); + // add a membership and its plain attribute + updateAnyObject(new AnyObjectUR.Builder(canonMf.getKey()).memberships( + new MembershipUR.Builder(otherchild.getKey()).plainAttrs(attr("ctype", "otherchildctype")) + .build()).build()); + Awaitility.await().until(() -> ANY_OBJECT_SERVICE.search(new AnyQuery.Builder().page(1).size(10) Review Comment: Everywhere in this PR, thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@syncope.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org