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

ilgrosso pushed a commit to branch 4_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit 1e9bf7c33b17ad0db8d147ce6d9169e0998eb9e6
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Fri Jul 25 12:39:35 2025 +0200

    Upgrading CAS
---
 .../apache/syncope/fit/ui/AbstractUIITCase.java    | 42 ++++++++--------------
 .../org/apache/syncope/fit/ui/OIDCC4UIITCase.java  |  5 ++-
 .../org/apache/syncope/fit/ui/OpenFGAUIITCase.java |  7 ++--
 .../apache/syncope/fit/ui/SAML2SP4UIITCase.java    |  8 ++---
 pom.xml                                            |  2 +-
 5 files changed, 22 insertions(+), 42 deletions(-)

diff --git 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/AbstractUIITCase.java
 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/AbstractUIITCase.java
index ce61575e56..351cd552f4 100644
--- 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/AbstractUIITCase.java
+++ 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/AbstractUIITCase.java
@@ -128,8 +128,6 @@ public abstract class AbstractUIITCase extends 
AbstractITCase {
 
     protected abstract void sso(String baseURL, String username, String 
password) throws IOException;
 
-    protected abstract void passwordManagement(String baseURL, String 
username, String password) throws IOException;
-
     @Test
     public void sso2Console() throws IOException {
         sso(CONSOLE_ADDRESS, "bellini", "password");
@@ -140,12 +138,14 @@ public abstract class AbstractUIITCase extends 
AbstractITCase {
         sso(ENDUSER_ADDRESS, "bellini", "password");
     }
 
-    @Test
-    public void passwordManagementConsole() throws IOException {
+    protected abstract void passwordManagement(String baseURL, String 
username, String password) throws IOException;
+
+    protected void passwordManagement(final String baseURL) throws IOException 
{
         String key = null;
         try {
-            UserCR userCR = new UserCR.Builder(SyncopeConstants.ROOT_REALM, 
"mustChangePassword").mustChangePassword(
-                            Boolean.TRUE).password("Password123!")
+            UserCR userCR = new UserCR.Builder(SyncopeConstants.ROOT_REALM, 
"mustChangePassword")
+                    .password("Password123!")
+                    .mustChangePassword(true)
                     .plainAttr(new 
Attr.Builder("fullname").value("mustChangePassword").build())
                     .plainAttr(new 
Attr.Builder("userId").value("[email protected]").build())
                     .plainAttr(new 
Attr.Builder("surname").value("mustChangePassword").build()).build();
@@ -154,34 +154,20 @@ public abstract class AbstractUIITCase extends 
AbstractITCase {
             assertEquals(HttpStatus.SC_CREATED, response.getStatus());
             key = response.getHeaderString(RESTHeaders.RESOURCE_KEY);
 
-            passwordManagement(CONSOLE_ADDRESS, "mustChangePassword", 
"Password123!");
+            AbstractUIITCase.this.passwordManagement(baseURL, 
"mustChangePassword", "Password123!");
         } finally {
-            if (key != null) {
-                USER_SERVICE.delete(key);
-            }
+            Optional.ofNullable(key).ifPresent(USER_SERVICE::delete);
         }
     }
 
     @Test
-    public void passwordManagementEnduser() throws IOException {
-        String key = null;
-        try {
-            UserCR userCR = new UserCR.Builder(SyncopeConstants.ROOT_REALM, 
"mustChangePassword").mustChangePassword(
-                            Boolean.TRUE).password("Password123!")
-                    .plainAttr(new 
Attr.Builder("fullname").value("mustChangePassword").build())
-                    .plainAttr(new 
Attr.Builder("userId").value("[email protected]").build())
-                    .plainAttr(new 
Attr.Builder("surname").value("mustChangePassword").build()).build();
-
-            Response response = USER_SERVICE.create(userCR);
-            assertEquals(HttpStatus.SC_CREATED, response.getStatus());
-            key = response.getHeaderString(RESTHeaders.RESOURCE_KEY);
+    public void passwordManagementConsole() throws IOException {
+        passwordManagement(CONSOLE_ADDRESS);
+    }
 
-            passwordManagement(ENDUSER_ADDRESS, "mustChangePassword", 
"Password123!");
-        } finally {
-            if (key != null) {
-                USER_SERVICE.delete(key);
-            }
-        }
+    @Test
+    public void passwordManagementEnduser() throws IOException {
+        passwordManagement(ENDUSER_ADDRESS);
     }
 
     @Test
diff --git 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OIDCC4UIITCase.java 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OIDCC4UIITCase.java
index b4c4047b12..01403501b3 100644
--- 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OIDCC4UIITCase.java
+++ 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OIDCC4UIITCase.java
@@ -20,6 +20,7 @@ package org.apache.syncope.fit.ui;
 
 import static org.awaitility.Awaitility.await;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
@@ -341,9 +342,7 @@ public class OIDCC4UIITCase extends AbstractUIITCase {
         assertEquals(HttpStatus.SC_OK, 
response.getStatusLine().getStatusCode());
 
         UserTO userTO = USER_SERVICE.read("mustChangePassword");
-
-        assertNotNull(userTO);
-        assertEquals(userTO.isMustChangePassword(), Boolean.FALSE);
+        assertFalse(userTO.isMustChangePassword());
 
         responseBody = EntityUtils.toString(response.getEntity());
 
diff --git 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OpenFGAUIITCase.java 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OpenFGAUIITCase.java
index 20984326ad..2bae4172d1 100644
--- 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OpenFGAUIITCase.java
+++ 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/OpenFGAUIITCase.java
@@ -47,7 +47,6 @@ import org.apache.syncope.common.rest.api.RESTHeaders;
 import org.apache.syncope.common.rest.api.beans.ExecSpecs;
 import org.apache.syncope.common.rest.api.service.wa.WAConfigService;
 import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Disabled;
 
 public class OpenFGAUIITCase extends OIDCC4UIITCase {
 
@@ -156,15 +155,13 @@ public class OpenFGAUIITCase extends OIDCC4UIITCase {
         assumeFalse(true);
     }
 
-    @Disabled
     @Override
     public void passwordManagementConsole() {
-        // ignore
+        assumeFalse(true);
     }
 
-    @Disabled
     @Override
     public void passwordManagementEnduser() {
-        // ignore
+        assumeFalse(true);
     }
 }
diff --git 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/SAML2SP4UIITCase.java
 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/SAML2SP4UIITCase.java
index d3fd41dc15..d2dec2febd 100644
--- 
a/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/SAML2SP4UIITCase.java
+++ 
b/fit/wa-reference/src/test/java/org/apache/syncope/fit/ui/SAML2SP4UIITCase.java
@@ -20,7 +20,6 @@ package org.apache.syncope.fit.ui;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
 
@@ -375,11 +374,10 @@ public class SAML2SP4UIITCase extends AbstractUIITCase {
         post.addHeader(HttpHeaders.ACCEPT_LANGUAGE, EN_LANGUAGE);
         post.setEntity(new UrlEncodedFormEntity(form, Consts.UTF_8));
         try (CloseableHttpResponse response = httpclient.execute(post, 
context)) {
-            UserTO userTO = USER_SERVICE.read("mustChangePassword");
-
             assertEquals(HttpStatus.SC_OK, 
response.getStatusLine().getStatusCode());
-            assertNotNull(userTO);
-            assertEquals(userTO.isMustChangePassword(), Boolean.FALSE);
+
+            UserTO userTO = USER_SERVICE.read("mustChangePassword");
+            assertFalse(userTO.isMustChangePassword());
 
             responseBody = EntityUtils.toString(response.getEntity());
 
diff --git a/pom.xml b/pom.xml
index e00606f4c1..c17508cec0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -443,7 +443,7 @@ under the License.
 
     <pac4j.version>6.1.1</pac4j.version>
 
-    <cas.version>7.2.5-SNAPSHOT</cas.version>
+    <cas.version>7.2.5</cas.version>
     <cas-client.version>4.0.4</cas-client.version>
 
     <swagger-core.version>2.2.34</swagger-core.version>

Reply via email to