From 0bcf81a3f914ff1a1ae5f79a098bec3044423e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Chicchiricc=C3=B2?= Date: Thu, 12 Sep 2024 16:09:01 +0200 Subject: [PATCH] Debug help --- .../test/java/org/apache/syncope/fit/ui/OIDCC4UIITCase.java | 6 ++++++ .../java/org/apache/syncope/fit/ui/SAML2SP4UIITCase.java | 6 ++++++ 2 files changed, 12 insertions(+) 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 6505af1172..ed6986b64e 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 @@ -260,6 +260,12 @@ protected void sso(final String baseURL, final String username, final String pas // 3. verify that user is now authenticated assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode()); + + String body = EntityUtils.toString(response.getEntity()); + if (!body.contains(username)) { + fail("XXXXXXXXXXXX\n" + body); + } + assertTrue(EntityUtils.toString(response.getEntity()).contains(username)); // 4. logout 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 929824c8c4..12aff0ab3f 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 @@ -295,6 +295,12 @@ protected void sso(final String baseURL, final String username, final String pas get = new HttpGet(baseURL + StringUtils.removeStart(location, "../")); try (CloseableHttpResponse response = httpclient.execute(get, context)) { assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode()); + + String body = EntityUtils.toString(response.getEntity()); + if (!body.contains(username)) { + fail("XXXXXXXXXXXX\n" + body); + } + assertTrue(EntityUtils.toString(response.getEntity()).contains(username)); }