Skip to content

Commit

Permalink
Debug help
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Sep 12, 2024
1 parent f6be217 commit 0bcf81a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 0bcf81a

Please sign in to comment.