diff --git a/build.gradle b/build.gradle index b36f1c6..5a799cc 100644 --- a/build.gradle +++ b/build.gradle @@ -29,18 +29,6 @@ allprojects { options.compilerArgs.add("-parameters") } - tasks.withType(Format).tap { - configureEach { - it.enabled = !it.identityPath.toString().contains("saml2") - } - } - - tasks.withType(CheckFormat).tap { - configureEach { - it.enabled = !it.identityPath.toString().contains("saml2") - } - } - tasks.matching { it.name == 'formatAot' }.all { task -> task.enabled = false } diff --git a/servlet/spring-boot/java/saml2/custom-urls/build.gradle b/servlet/spring-boot/java/saml2/custom-urls/build.gradle index 3ba140c..1c40adf 100644 --- a/servlet/spring-boot/java/saml2/custom-urls/build.gradle +++ b/servlet/spring-boot/java/saml2/custom-urls/build.gradle @@ -12,9 +12,6 @@ repositories { maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" } } -sourceSets.main.java.srcDirs += "$projectDir/../identity-provider/src/main/java" -sourceSets.main.resources.srcDirs += "$projectDir/../identity-provider/src/main/resources" - dependencies { constraints { implementation "org.opensaml:opensaml-saml-api:5.1.3" @@ -26,10 +23,12 @@ dependencies { implementation 'org.springframework.security:spring-security-saml2-service-provider' implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6' + runtimeOnly files("$projectDir/../identity-provider/build/resources/main") + + testImplementation project(':servlet:spring-boot:java:saml2:identity-provider') testImplementation 'org.htmlunit:htmlunit' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' - runtimeOnly "org.springframework.boot:spring-boot-docker-compose" } tasks.withType(Test).configureEach { diff --git a/servlet/spring-boot/java/saml2/custom-urls/settings.gradle b/servlet/spring-boot/java/saml2/custom-urls/settings.gradle index 733fda6..0c49957 100644 --- a/servlet/spring-boot/java/saml2/custom-urls/settings.gradle +++ b/servlet/spring-boot/java/saml2/custom-urls/settings.gradle @@ -6,3 +6,6 @@ pluginManagement { maven { url "https://repo.spring.io/snapshot" } } } + +include ":servlet:spring-boot:java:saml2:identity-provider" +project(":servlet:spring-boot:java:saml2:identity-provider").projectDir = file("../identity-provider") \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/custom-urls/src/integTest/java/example/PreDockerComposeServerPortInitializer.java b/servlet/spring-boot/java/saml2/custom-urls/src/integTest/java/example/PreDockerComposeServerPortInitializer.java deleted file mode 100644 index 96e373d..0000000 --- a/servlet/spring-boot/java/saml2/custom-urls/src/integTest/java/example/PreDockerComposeServerPortInitializer.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2002-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package example; - -import java.io.IOException; -import java.net.ServerSocket; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; -import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.env.PropertySource; - -/** - * Spring Boot doesn't determine the port before the docker containers are loaded, so - * we'll decide the test port here and override the associated properties. - * - * @author Josh Cummings - */ -public class PreDockerComposeServerPortInitializer implements EnvironmentPostProcessor { - - private static final Integer port = getPort(); - - @Override - public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { - environment.getPropertySources().addFirst(new ServerPortPropertySource(port)); - } - - private static Integer getPort() { - try (ServerSocket serverSocket = new ServerSocket(0)) { - return serverSocket.getLocalPort(); - } - catch (IOException ex) { - throw new RuntimeException(ex); - } - } - - private static class ServerPortPropertySource extends PropertySource { - - ServerPortPropertySource(Integer port) { - super("server.port.override", port); - } - - @Override - public Object getProperty(String name) { - if ("server.port".equals(name)) { - return getSource(); - } - if ("SERVER_PORT".equals(name)) { - return getSource(); - } - return null; - } - - } - -} diff --git a/servlet/spring-boot/java/saml2/custom-urls/src/integTest/resources/META-INF/spring.factories b/servlet/spring-boot/java/saml2/custom-urls/src/integTest/resources/META-INF/spring.factories deleted file mode 100644 index f4d2ae4..0000000 --- a/servlet/spring-boot/java/saml2/custom-urls/src/integTest/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.env.EnvironmentPostProcessor=example.PreDockerComposeServerPortInitializer \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/custom-urls/src/main/resources/application.yml b/servlet/spring-boot/java/saml2/custom-urls/src/main/resources/application.yml index b004b61..a11df22 100644 --- a/servlet/spring-boot/java/saml2/custom-urls/src/main/resources/application.yml +++ b/servlet/spring-boot/java/saml2/custom-urls/src/main/resources/application.yml @@ -4,11 +4,9 @@ logging.level: spring: docker: compose: - file: docker:docker/compose.yml + file: classpath:docker/compose.yml readiness: wait: never - skip: - in-tests: false security: filter: dispatcher-types: async, error, request, forward diff --git a/servlet/spring-boot/java/saml2/identity-provider/build.gradle b/servlet/spring-boot/java/saml2/identity-provider/build.gradle index 78c965a..5633c5a 100644 --- a/servlet/spring-boot/java/saml2/identity-provider/build.gradle +++ b/servlet/spring-boot/java/saml2/identity-provider/build.gradle @@ -13,8 +13,9 @@ repositories { dependencies { - implementation 'org.springframework.boot:spring-boot-starter' - runtimeOnly "org.springframework.boot:spring-boot-docker-compose" + implementation 'org.springframework.boot:spring-boot-starter-test' + implementation "org.testcontainers:testcontainers:1.20.3" + implementation "org.testcontainers:junit-jupiter:1.20.3" } tasks.withType(Test).configureEach { diff --git a/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/ComposeFilePropertyPlaceholderApplicationContextInitializer.java b/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/ComposeFilePropertyPlaceholderApplicationContextInitializer.java deleted file mode 100644 index 69c6e46..0000000 --- a/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/ComposeFilePropertyPlaceholderApplicationContextInitializer.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2002-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package example; - -import org.springframework.context.ApplicationContextInitializer; -import org.springframework.context.ConfigurableApplicationContext; - -public class ComposeFilePropertyPlaceholderApplicationContextInitializer - implements ApplicationContextInitializer { - - @Override - public void initialize(ConfigurableApplicationContext context) { - DockerProtocolResolver.environment = context.getEnvironment(); - } - -} diff --git a/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/DockerProtocolResolver.java b/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/DockerProtocolResolver.java deleted file mode 100644 index 2c8c245..0000000 --- a/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/DockerProtocolResolver.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2002-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package example; - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; - -import org.springframework.core.env.Environment; -import org.springframework.core.io.FileSystemResource; -import org.springframework.core.io.ProtocolResolver; -import org.springframework.core.io.Resource; -import org.springframework.core.io.ResourceLoader; - -public class DockerProtocolResolver implements ProtocolResolver { - - private static final String PREFIX = "docker:"; - - static Environment environment; - - @Override - public Resource resolve(String location, ResourceLoader resourceLoader) { - if (!location.startsWith(PREFIX)) { - return null; - } - Resource resource = resourceLoader.getResource(location.replace(PREFIX, "classpath:")); - try { - String content = resource.getContentAsString(StandardCharsets.UTF_8); - content = environment.resolvePlaceholders(content); - File file = resource.getFile(); - File tmp = new File(file.getAbsolutePath() + ".tmp"); - tmp.createNewFile(); - Files.write(tmp.toPath(), content.getBytes(StandardCharsets.UTF_8)); - tmp.deleteOnExit(); - return new FileSystemResource(tmp); - } - catch (Exception ex) { - throw new RuntimeException(ex); - } - } - -} diff --git a/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/IdentityProviderTestExecutionListener.java b/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/IdentityProviderTestExecutionListener.java new file mode 100644 index 0000000..65054b0 --- /dev/null +++ b/servlet/spring-boot/java/saml2/identity-provider/src/main/java/example/IdentityProviderTestExecutionListener.java @@ -0,0 +1,53 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package example; + +import java.io.IOException; +import java.net.ServerSocket; + +import org.testcontainers.containers.DockerComposeContainer; + +import org.springframework.core.io.ClassPathResource; +import org.springframework.test.context.TestContext; +import org.springframework.test.context.support.AbstractTestExecutionListener; + +public class IdentityProviderTestExecutionListener extends AbstractTestExecutionListener { + + private DockerComposeContainer composed; + + @Override + public void beforeTestClass(TestContext testContext) throws Exception { + String port = Integer.toString(getRandomPort()); + System.setProperty("SERVER_PORT", port); + System.setProperty("server.port", port); + this.composed = new DockerComposeContainer<>("saml2", new ClassPathResource("docker/compose.yml").getFile()) + .withEnv("SERVER_PORT", port); + this.composed.start(); + } + + @Override + public void afterTestClass(TestContext testContext) throws Exception { + this.composed.stop(); + } + + static int getRandomPort() throws IOException { + try (ServerSocket serverSocket = new ServerSocket(0)) { + return serverSocket.getLocalPort(); + } + } + +} diff --git a/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/META-INF/spring.factories b/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/META-INF/spring.factories index 0bc6cb6..a414146 100644 --- a/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/META-INF/spring.factories +++ b/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/META-INF/spring.factories @@ -1,2 +1 @@ -org.springframework.context.ApplicationContextInitializer=example.ComposeFilePropertyPlaceholderApplicationContextInitializer -org.springframework.core.io.ProtocolResolver=example.DockerProtocolResolver \ No newline at end of file +org.springframework.test.context.TestExecutionListener=example.IdentityProviderTestExecutionListener \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/docker/compose.yml b/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/docker/compose.yml index 8ea5d86..f37a273 100644 --- a/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/docker/compose.yml +++ b/servlet/spring-boot/java/saml2/identity-provider/src/main/resources/docker/compose.yml @@ -5,7 +5,7 @@ services: - ./metadata/authsources.php:/var/www/simplesamlphp/config/authsources.php - ./metadata/one-relyingparties.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php environment: - - PORT=${SERVER_PORT:8080} + - PORT=${SERVER_PORT:-8080} idp-two.7f000001.nip.io: image: kristophjunge/test-saml-idp:1.15 @@ -13,7 +13,7 @@ services: - ./metadata/authsources.php:/var/www/simplesamlphp/config/authsources.php - ./metadata/two-relyingparties.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php environment: - - PORT=${SERVER_PORT:8080} + - PORT=${SERVER_PORT:-8080} nginx: image: nginx:stable diff --git a/servlet/spring-boot/java/saml2/login/build.gradle b/servlet/spring-boot/java/saml2/login/build.gradle index 3ba140c..d636ab5 100644 --- a/servlet/spring-boot/java/saml2/login/build.gradle +++ b/servlet/spring-boot/java/saml2/login/build.gradle @@ -12,9 +12,6 @@ repositories { maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" } } -sourceSets.main.java.srcDirs += "$projectDir/../identity-provider/src/main/java" -sourceSets.main.resources.srcDirs += "$projectDir/../identity-provider/src/main/resources" - dependencies { constraints { implementation "org.opensaml:opensaml-saml-api:5.1.3" @@ -26,6 +23,9 @@ dependencies { implementation 'org.springframework.security:spring-security-saml2-service-provider' implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6' + runtimeOnly files("$projectDir/../identity-provider/build/resources/main") + + testImplementation project(":servlet:spring-boot:java:saml2:identity-provider") testImplementation 'org.htmlunit:htmlunit' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' diff --git a/servlet/spring-boot/java/saml2/login/settings.gradle b/servlet/spring-boot/java/saml2/login/settings.gradle index 733fda6..0c49957 100644 --- a/servlet/spring-boot/java/saml2/login/settings.gradle +++ b/servlet/spring-boot/java/saml2/login/settings.gradle @@ -6,3 +6,6 @@ pluginManagement { maven { url "https://repo.spring.io/snapshot" } } } + +include ":servlet:spring-boot:java:saml2:identity-provider" +project(":servlet:spring-boot:java:saml2:identity-provider").projectDir = file("../identity-provider") \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/login/src/integTest/java/example/PreDockerComposeServerPortInitializer.java b/servlet/spring-boot/java/saml2/login/src/integTest/java/example/PreDockerComposeServerPortInitializer.java deleted file mode 100644 index 96e373d..0000000 --- a/servlet/spring-boot/java/saml2/login/src/integTest/java/example/PreDockerComposeServerPortInitializer.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2002-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package example; - -import java.io.IOException; -import java.net.ServerSocket; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; -import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.env.PropertySource; - -/** - * Spring Boot doesn't determine the port before the docker containers are loaded, so - * we'll decide the test port here and override the associated properties. - * - * @author Josh Cummings - */ -public class PreDockerComposeServerPortInitializer implements EnvironmentPostProcessor { - - private static final Integer port = getPort(); - - @Override - public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { - environment.getPropertySources().addFirst(new ServerPortPropertySource(port)); - } - - private static Integer getPort() { - try (ServerSocket serverSocket = new ServerSocket(0)) { - return serverSocket.getLocalPort(); - } - catch (IOException ex) { - throw new RuntimeException(ex); - } - } - - private static class ServerPortPropertySource extends PropertySource { - - ServerPortPropertySource(Integer port) { - super("server.port.override", port); - } - - @Override - public Object getProperty(String name) { - if ("server.port".equals(name)) { - return getSource(); - } - if ("SERVER_PORT".equals(name)) { - return getSource(); - } - return null; - } - - } - -} diff --git a/servlet/spring-boot/java/saml2/login/src/integTest/resources/META-INF/spring.factories b/servlet/spring-boot/java/saml2/login/src/integTest/resources/META-INF/spring.factories deleted file mode 100644 index f4d2ae4..0000000 --- a/servlet/spring-boot/java/saml2/login/src/integTest/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.env.EnvironmentPostProcessor=example.PreDockerComposeServerPortInitializer \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/login/src/main/resources/application.yml b/servlet/spring-boot/java/saml2/login/src/main/resources/application.yml index da7ea59..45f4d7c 100644 --- a/servlet/spring-boot/java/saml2/login/src/main/resources/application.yml +++ b/servlet/spring-boot/java/saml2/login/src/main/resources/application.yml @@ -4,11 +4,9 @@ logging.level: spring: docker: compose: - file: docker:docker/compose.yml + file: classpath:docker/compose.yml readiness: wait: never - skip: - in-tests: false security: saml2: relyingparty: diff --git a/servlet/spring-boot/java/saml2/refreshable-metadata/build.gradle b/servlet/spring-boot/java/saml2/refreshable-metadata/build.gradle index 4a4572f..8d2393a 100644 --- a/servlet/spring-boot/java/saml2/refreshable-metadata/build.gradle +++ b/servlet/spring-boot/java/saml2/refreshable-metadata/build.gradle @@ -13,9 +13,6 @@ repositories { maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" } } -sourceSets.main.java.srcDirs += "$projectDir/../identity-provider/src/main/java" -sourceSets.main.resources.srcDirs += "$projectDir/../identity-provider/src/main/resources" - dependencies { constraints { implementation "org.opensaml:opensaml-saml-api:5.1.2" @@ -27,6 +24,9 @@ dependencies { implementation 'org.springframework.security:spring-security-saml2-service-provider' implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6' + runtimeOnly files("$projectDir/../identity-provider/build/resources/main") + + testImplementation project(':servlet:spring-boot:java:saml2:identity-provider') testImplementation 'org.htmlunit:htmlunit' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' diff --git a/servlet/spring-boot/java/saml2/refreshable-metadata/settings.gradle b/servlet/spring-boot/java/saml2/refreshable-metadata/settings.gradle index 733fda6..0c49957 100644 --- a/servlet/spring-boot/java/saml2/refreshable-metadata/settings.gradle +++ b/servlet/spring-boot/java/saml2/refreshable-metadata/settings.gradle @@ -6,3 +6,6 @@ pluginManagement { maven { url "https://repo.spring.io/snapshot" } } } + +include ":servlet:spring-boot:java:saml2:identity-provider" +project(":servlet:spring-boot:java:saml2:identity-provider").projectDir = file("../identity-provider") \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/PreDockerComposeServerPortInitializer.java b/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/PreDockerComposeServerPortInitializer.java deleted file mode 100644 index 96e373d..0000000 --- a/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/PreDockerComposeServerPortInitializer.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2002-2021 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package example; - -import java.io.IOException; -import java.net.ServerSocket; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; -import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.env.PropertySource; - -/** - * Spring Boot doesn't determine the port before the docker containers are loaded, so - * we'll decide the test port here and override the associated properties. - * - * @author Josh Cummings - */ -public class PreDockerComposeServerPortInitializer implements EnvironmentPostProcessor { - - private static final Integer port = getPort(); - - @Override - public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { - environment.getPropertySources().addFirst(new ServerPortPropertySource(port)); - } - - private static Integer getPort() { - try (ServerSocket serverSocket = new ServerSocket(0)) { - return serverSocket.getLocalPort(); - } - catch (IOException ex) { - throw new RuntimeException(ex); - } - } - - private static class ServerPortPropertySource extends PropertySource { - - ServerPortPropertySource(Integer port) { - super("server.port.override", port); - } - - @Override - public Object getProperty(String name) { - if ("server.port".equals(name)) { - return getSource(); - } - if ("SERVER_PORT".equals(name)) { - return getSource(); - } - return null; - } - - } - -} diff --git a/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/Saml2LoginApplicationITests.java b/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/Saml2LoginApplicationITests.java index 4902047..3ef8a01 100644 --- a/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/Saml2LoginApplicationITests.java +++ b/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/java/example/Saml2LoginApplicationITests.java @@ -41,7 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat; @AutoConfigureMockMvc public class Saml2LoginApplicationITests { - @LocalServerPort int port; diff --git a/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/resources/META-INF/spring.factories b/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/resources/META-INF/spring.factories deleted file mode 100644 index f4d2ae4..0000000 --- a/servlet/spring-boot/java/saml2/refreshable-metadata/src/integTest/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.env.EnvironmentPostProcessor=example.PreDockerComposeServerPortInitializer \ No newline at end of file diff --git a/servlet/spring-boot/java/saml2/refreshable-metadata/src/main/resources/application.yml b/servlet/spring-boot/java/saml2/refreshable-metadata/src/main/resources/application.yml index f6cedd3..7bacfaa 100644 --- a/servlet/spring-boot/java/saml2/refreshable-metadata/src/main/resources/application.yml +++ b/servlet/spring-boot/java/saml2/refreshable-metadata/src/main/resources/application.yml @@ -1,11 +1,9 @@ spring: docker: compose: - file: docker:docker/compose.yml + file: classpath:docker/compose.yml readiness: wait: never - skip: - in-tests: false security: saml2: relyingparty: