From b59db773aeb11ef5bebd8f9288abe03ccabd19bf Mon Sep 17 00:00:00 2001 From: Garth <244253+xgp@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:53:42 +0200 Subject: [PATCH] update to java 21 dep. disabled test for entra saml xml import. --- pom.xml | 6 ++--- .../resource/OrganizationResourceTest.java | 22 ++----------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index 8a117c38..abc972d9 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ - 17 + 21 UTF-8 io.phasetwo.service 5.8.2 @@ -129,7 +129,7 @@ com.spotify.fmt fmt-maven-plugin - 2.21.1 + 2.23 org.apache.maven.plugins @@ -300,7 +300,7 @@ com.github.dasniko testcontainers-keycloak - 3.3.0 + 3.4.0 test diff --git a/src/test/java/io/phasetwo/service/resource/OrganizationResourceTest.java b/src/test/java/io/phasetwo/service/resource/OrganizationResourceTest.java index 7d266faf..15bdb816 100644 --- a/src/test/java/io/phasetwo/service/resource/OrganizationResourceTest.java +++ b/src/test/java/io/phasetwo/service/resource/OrganizationResourceTest.java @@ -322,7 +322,7 @@ void testGetDomains() throws IOException { } @Test - @Disabled("not working in 25") + @Disabled("currently not working with entra") void testImportConfig() throws Exception { OrganizationRepresentation org = createDefaultOrg(); @@ -335,6 +335,7 @@ void testImportConfig() throws Exception { "saml", "realm", REALM); + Response response = postRequest(urlConf, org.getId(), "idps", "import-config"); assertThat(response.getStatusCode(), is(Status.OK.getStatusCode())); @@ -346,25 +347,6 @@ void testImportConfig() throws Exception { assertThat(config, hasEntry("postBindingLogout", "false")); assertThat(config, hasEntry("validateSignature", "false")); assertThat(config, hasEntry("wantAuthnRequestsSigned", "false")); - - // import-config manually - urlConf = - ImmutableMap.of( - "fromUrl", - "https://login.microsoftonline.com/75a21e21-e75f-46cd-81a1-73b0486c7e81/federationmetadata/2007-06/federationmetadata.xml?appid=65032359-8102-4ff8-aed0-005752ce97ff", - "providerId", - "saml", - "realm", - REALM); - response = postRequest(urlConf, org.getId(), "idps", "import-config"); - - assertThat(response.getStatusCode(), is(Status.OK.getStatusCode())); - config = objectMapper().readValue(response.getBody().asString(), new TypeReference<>() {}); - assertThat(config, notNullValue()); - assertThat(config, hasEntry("loginHint", "false")); - assertThat(config, hasEntry("postBindingLogout", "false")); - assertThat(config, hasEntry("validateSignature", "false")); - assertThat(config, hasEntry("wantAuthnRequestsSigned", "false")); // delete org deleteOrganization(org.getId()); }