You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/07/19 15:42:31 UTC
[sling-org-apache-sling-feature-cpconverter] 01/02: SLING-8586 -
[cp2fm] "create service user" repoinit instruction throws
javax.jcr.nodetype.ConstraintViolationException
This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a commit to branch SLING-8586
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git
commit 7eb5bbef87babfe7438e51267b1c9fe7653e0b8b
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Fri Jul 19 17:20:41 2019 +0200
SLING-8586 - [cp2fm] "create service user" repoinit instruction throws
javax.jcr.nodetype.ConstraintViolationException
tests adjusted according to latest modifications
---
.../org/apache/sling/feature/cpconverter/acl/AclManagerTest.java | 7 ++++---
.../feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java | 9 ++++++---
.../cpconverter/handlers/SystemUsersEntryHandlerTest.java | 3 ++-
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java
index 384168c..a20f8be 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/acl/AclManagerTest.java
@@ -81,7 +81,8 @@ public class AclManagerTest {
assertNotNull(repoinitExtension);
// acs-commons-on-deploy-scripts-service will be missed
- String expected = "create service user acs-commons-package-replication-status-event-service with path /asd/public\n" +
+ String expected = "create path (rep:AuthorizableFolder) /asd/public\n" + // SLING-8586
+ "create service user acs-commons-package-replication-status-event-service with path /asd/public\n" +
"create path (sling:Folder) /asd\n" +
"create path (sling:Folder) /asd/public\n" +
// see SLING-8561
@@ -112,9 +113,9 @@ public class AclManagerTest {
Extension repoinitExtension = feature.getExtensions().getByName(Extension.EXTENSION_NAME_REPOINIT);
assertNotNull(repoinitExtension);
- System.out.println(repoinitExtension.getText());
- String expected = "create service user sys-usr with path /home/users/system\n" +
+ String expected = "create path (rep:AuthorizableFolder) /home/users/system\n" + // SLING-8586
+ "create service user sys-usr with path /home/users/system\n" +
"create path (sling:Folder) /content\n" +
"create path (sling:Folder) /content/cq:tags\n" +
"set ACL for sys-usr\n" +
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
index 5545bb4..fd8d048 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandlerTest.java
@@ -95,7 +95,8 @@ public final class RepPolicyEntryHandlerTest {
assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
// commented ACLs are due SLING-8561
- String expected = "create service user acs-commons-ensure-oak-index-service with path /asd/public\n" +
+ String expected = "create path (rep:AuthorizableFolder) /asd/public\n" + // SLING-8586
+ "create service user acs-commons-ensure-oak-index-service with path /asd/public\n" +
// "create path (sling:Folder) /asd\n" +
// "create path (sling:Folder) /asd/public\n" +
// "set ACL for acs-commons-ensure-oak-index-service\n" +
@@ -141,7 +142,8 @@ public final class RepPolicyEntryHandlerTest {
assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
// commented ACLs are due SLING-8561
- String expected = "create service user acs-commons-package-replication-status-event-service with path /asd/public\n" +
+ String expected = "create path (rep:AuthorizableFolder) /asd/public\n" + // SLING-8586
+ "create service user acs-commons-package-replication-status-event-service with path /asd/public\n" +
// "create path (sling:Folder) /asd\n" +
// "create path (sling:Folder) /asd/public\n" +
// "set ACL for acs-commons-package-replication-status-event-service\n" +
@@ -184,7 +186,8 @@ public final class RepPolicyEntryHandlerTest {
assertNotNull(repoinitExtension);
assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
- String expected = "create service user acs-commons-package-replication-status-event-service with path /this/is/a/completely/different/path\n" +
+ String expected = "create path (rep:AuthorizableFolder) /this/is/a/completely/different/path\n" + // SLING-8586
+ "create service user acs-commons-package-replication-status-event-service with path /this/is/a/completely/different/path\n" +
"create path (sling:Folder) /asd\n" +
"create path (sling:Folder) /asd/public\n" +
"set ACL for acs-commons-package-replication-status-event-service\n" +
diff --git a/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java b/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java
index 9dd5050..ca774b3 100644
--- a/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java
+++ b/src/test/java/org/apache/sling/feature/cpconverter/handlers/SystemUsersEntryHandlerTest.java
@@ -81,7 +81,8 @@ public class SystemUsersEntryHandlerTest {
assertEquals(ExtensionType.TEXT, repoinitExtension.getType());
assertTrue(repoinitExtension.isRequired());
- String expected = "create service user asd-share-commons-asd-index-definition-reader-service with path /home/users/system/asd-share-commons\n";
+ String expected = "create path (rep:AuthorizableFolder) /home/users/system/asd-share-commons\n" + // SLING-8586
+ "create service user asd-share-commons-asd-index-definition-reader-service with path /home/users/system/asd-share-commons\n";
String actual = repoinitExtension.getText();
assertEquals(expected, actual);