anchela commented on a change in pull request #53:
URL:
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/53#discussion_r559984462
##########
File path:
src/test/java/org/apache/sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java
##########
@@ -18,10 +18,7 @@
import org.apache.sling.feature.Extension;
import org.apache.sling.feature.ExtensionType;
-import org.apache.sling.feature.cpconverter.accesscontrol.AclManager;
-import org.apache.sling.feature.cpconverter.accesscontrol.DefaultAclManager;
-import org.apache.sling.feature.cpconverter.accesscontrol.SystemUser;
-import org.apache.sling.feature.cpconverter.accesscontrol.User;
+import org.apache.sling.feature.cpconverter.accesscontrol.*;
Review comment:
* import.....
##########
File path:
src/test/java/org/apache/sling/feature/cpconverter/handlers/GroupEntryHandlerTest.java
##########
@@ -70,4 +70,16 @@ public void parseUser() throws Exception {
TestUtils.createRepoInitExtension(handler, aclManager, path,
getClass().getResourceAsStream(path.substring(1)));
verify(aclManager, never()).addGroup(any(Group.class));
}
+
+ @Test
+ public void parseGroupWithConfig() throws Exception {
+ String path =
"/jcr_root/system/groups/g/V084LLw1ypl2l9G0e28c/.content.xml";
Review comment:
my initial reaction was: but that's the same as the hardcoded
default..... it's not but with just omitting the 'home' segment it looks
similar. i would suggest to use something entirely different like e.g. the
default value in apache jackrabbit oak to make it obvious.
i would also suggest to add a test that verifies that groups outside of the
configured path are not matched by the parser and thus are ignored.
##########
File path:
src/test/java/org/apache/sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java
##########
@@ -118,6 +115,18 @@ public void testUser() throws Exception {
verify(aclManager, never()).addSystemUser(any(SystemUser.class));
}
+ @Test
+ public void parseUserWithConfig() throws Exception {
+ String path = "/jcr_root/system/users/a/author/.content.xml";
Review comment:
see above in the group test.... same applies here
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]