This is an automated email from the ASF dual-hosted git repository.
mdisabatino pushed a commit to branch 2_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/2_0_X by this push:
new 4baa5b5 [SYNCOPE-1467] Added test
4baa5b5 is described below
commit 4baa5b56e5f199b71c248f4058b3841f25cef936
Author: Marco Di Sabatino Di Diodoro <[email protected]>
AuthorDate: Tue May 7 11:41:32 2019 +0200
[SYNCOPE-1467] Added test
---
.../org/apache/syncope/fit/core/GroupITCase.java | 39 ++++++++++++++++++++++
pom.xml | 2 +-
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git
a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java
index 04b141e..181af3c 100644
---
a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java
+++
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/GroupITCase.java
@@ -1177,4 +1177,43 @@ public class GroupITCase extends AbstractITCase {
assertNotNull(groupTO);
assertEquals("11.23",
groupTO.getPlainAttr(doubleSchemaName).getValues().get(0));
}
+
+ @Test
+ public void issueSYNCOPE1467() {
+ GroupTO groupTO = null;
+ try {
+ groupTO = new GroupTO();
+ groupTO.setRealm(SyncopeConstants.ROOT_REALM);
+ groupTO.setName("issueSYNCOPE1467");
+ groupTO.getResources().add(RESOURCE_NAME_LDAP);
+
+ groupTO = createGroup(groupTO).getEntity();
+ assertNotNull(groupTO);
+ assertTrue(groupTO.getResources().contains(RESOURCE_NAME_LDAP));
+
+ ConnObjectTO connObjectTO =
+ resourceService.readConnObject(RESOURCE_NAME_LDAP,
AnyTypeKind.GROUP.name(), groupTO.getKey());
+ assertNotNull(connObjectTO);
+ assertEquals("issueSYNCOPE1467",
connObjectTO.getAttr("cn").getValues().get(0));
+
+ GroupPatch groupPatch = new GroupPatch();
+ groupPatch.setKey(groupTO.getKey());
+ groupPatch.setName(new
StringReplacePatchItem.Builder().value("fixedSYNCOPE1467").build());
+
+ assertNotNull(updateGroup(groupPatch).getEntity());
+
+ // Assert resources are present
+ ResourceTO ldap = resourceService.read(RESOURCE_NAME_LDAP);
+ assertNotNull(ldap);
+
+ connObjectTO = resourceService.
+ readConnObject(RESOURCE_NAME_LDAP,
AnyTypeKind.GROUP.name(), groupTO.getKey());
+ assertNotNull(connObjectTO);
+ assertEquals("fixedSYNCOPE1467",
connObjectTO.getAttr("cn").getValues().get(0));
+ } finally {
+ if (groupTO.getKey() != null) {
+ groupService.delete(groupTO.getKey());
+ }
+ }
+ }
}
diff --git a/pom.xml b/pom.xml
index e88f83a..43d72bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -382,7 +382,7 @@ under the License.
<connid.rest.version>1.0.4</connid.rest.version>
<connid.database.version>2.2.6</connid.database.version>
<connid.csvdir.version>0.8.8</connid.csvdir.version>
- <connid.ldap.version>1.5.3</connid.ldap.version>
+ <connid.ldap.version>1.5.4-SNAPSHOT</connid.ldap.version>
<connid.ad.version>1.3.6</connid.ad.version>
<connid.googleapps.version>1.4.2</connid.googleapps.version>
<connid.azure.version>1.0.1</connid.azure.version>