You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2021/02/26 17:04:27 UTC

[sling-org-apache-sling-feature-cpconverter] branch master updated: SLING-10121 : Unable to checkout org-apache-sling-feature-cpconverter on Windows: Illegal files in path

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

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git


The following commit(s) were added to refs/heads/master by this push:
     new 559e583  SLING-10121 : Unable to checkout org-apache-sling-feature-cpconverter on Windows: Illegal files in path
559e583 is described below

commit 559e583734a30b0e4df427c2e327bc83d9986320
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Fri Feb 26 18:04:11 2021 +0100

    SLING-10121 : Unable to checkout org-apache-sling-feature-cpconverter on Windows: Illegal files in path
---
 .../sling/feature/cpconverter/handlers/GroupEntryHandlerTest.java   | 5 +++--
 .../sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java   | 6 ++++--
 .../_rep_groups}/g/V084LLw1ypl2l9G0e28c/.content.xml                | 0
 .../_rep_groups}/g/V084LLw1ypl2l9G0e28c/_rep_policy.xml             | 0
 .../_rep_authorizables/_rep_users}/a/author/.content.xml            | 0
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/sling/feature/cpconverter/handlers/GroupEntryHandlerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/handlers/GroupEntryHandlerTest.java
index 305d4cf..054191f 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/handlers/GroupEntryHandlerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/handlers/GroupEntryHandlerTest.java
@@ -74,12 +74,13 @@ public class GroupEntryHandlerTest {
     @Test
     public void parseGroupWithConfig() throws Exception {
         String path = "/jcr_root/rep:security/rep:authorizables/rep:groups/g/V084LLw1ypl2l9G0e28c/.content.xml";
+        String filePath = path.substring(1).replace("rep:", "_rep_");
         AclManager aclManager = mock(AclManager.class);
 
-        TestUtils.createRepoInitExtension(handler, aclManager, path, getClass().getResourceAsStream(path.substring(1)));
+        TestUtils.createRepoInitExtension(handler, aclManager, path, getClass().getResourceAsStream(filePath));
         verify(aclManager, never()).addGroup(any(Group.class));
 
-        TestUtils.createRepoInitExtension(handler.withConfig("/jcr_root(/rep:security/rep:authorizables/rep:groups.*/)\\.content.xml"), aclManager, path, getClass().getResourceAsStream(path.substring(1)));
+        TestUtils.createRepoInitExtension(handler.withConfig("/jcr_root(/rep:security/rep:authorizables/rep:groups.*/)\\.content.xml"), aclManager, path, getClass().getResourceAsStream(filePath));
         verify(aclManager, times(1)).addGroup(any(Group.class));
     }
 }
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java
index 283d63f..717efc0 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/handlers/UsersEntryHandlerTest.java
@@ -121,12 +121,14 @@ public class UsersEntryHandlerTest {
     @Test
     public void parseUserWithConfig() throws Exception {
         String path = "/jcr_root/rep:security/rep:authorizables/rep:users/a/author/.content.xml";
+        String filePath = path.substring(1).replace("rep:", "_rep_");
+
         AclManager aclManager = mock(AclManager.class);
 
-        TestUtils.createRepoInitExtension(usersEntryHandler, aclManager, path, getClass().getResourceAsStream(path.substring(1)));
+        TestUtils.createRepoInitExtension(usersEntryHandler, aclManager, path, getClass().getResourceAsStream(filePath));
         verify(aclManager, never()).addUser(any(User.class));
 
-        TestUtils.createRepoInitExtension(usersEntryHandler.withConfig("/jcr_root(/rep:security/rep:authorizables/rep:users.*/)\\.content.xml"), aclManager, path, getClass().getResourceAsStream(path.substring(1)));
+        TestUtils.createRepoInitExtension(usersEntryHandler.withConfig("/jcr_root(/rep:security/rep:authorizables/rep:users.*/)\\.content.xml"), aclManager, path, getClass().getResourceAsStream(filePath));
         verify(aclManager, times(1)).addUser(any(User.class));
     }
 
diff --git a/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/rep:security/rep:authorizables/rep:groups/g/V084LLw1ypl2l9G0e28c/.content.xml b/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/_rep_security/_rep_authorizables/_rep_groups/g/V084LLw1ypl2l9G0e28c/.content.xml
similarity index 100%
rename from src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/rep:security/rep:authorizables/rep:groups/g/V084LLw1ypl2l9G0e28c/.content.xml
rename to src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/_rep_security/_rep_authorizables/_rep_groups/g/V084LLw1ypl2l9G0e28c/.content.xml
diff --git a/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/rep:security/rep:authorizables/rep:groups/g/V084LLw1ypl2l9G0e28c/_rep_policy.xml b/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/_rep_security/_rep_authorizables/_rep_groups/g/V084LLw1ypl2l9G0e28c/_rep_policy.xml
similarity index 100%
rename from src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/rep:security/rep:authorizables/rep:groups/g/V084LLw1ypl2l9G0e28c/_rep_policy.xml
rename to src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/_rep_security/_rep_authorizables/_rep_groups/g/V084LLw1ypl2l9G0e28c/_rep_policy.xml
diff --git a/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/rep:security/rep:authorizables/rep:users/a/author/.content.xml b/src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/_rep_security/_rep_authorizables/_rep_users/a/author/.content.xml
similarity index 100%
rename from src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/rep:security/rep:authorizables/rep:users/a/author/.content.xml
rename to src/test/resources/org/apache/sling/feature/cpconverter/handlers/jcr_root/_rep_security/_rep_authorizables/_rep_users/a/author/.content.xml