1
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline failed

1
This commit is contained in:
Stephan Schnabel 2025-05-30 20:53:29 +02:00
parent a119d022f6
commit a7a23e1476
Signed by: stephan.schnabel
SSH key fingerprint: SHA256:99zuzxNGFb5/5P+E/O7ONU2qhUojUe/D8rIPTW+9Xp0
2 changed files with 4 additions and 5 deletions

View file

@ -57,8 +57,7 @@ public class KeycloakExtension implements BeforeAllCallback, ParameterResolver {
if (System.getenv("CI") != null) {
// use fixed port and hostname in ci
container = new FixedHostPortGenericContainer<>(image)
.withFixedExposedPort(8080, 8080)
.withCreateContainerCmdModifier(c -> c.withName("keycloak"));
.withFixedExposedPort(8080, 8080);
}
container.withEnv("KEYCLOAK_ADMIN", "admin")
.withEnv("KEYCLOAK_ADMIN_PASSWORD", "password")
@ -72,7 +71,7 @@ public class KeycloakExtension implements BeforeAllCallback, ParameterResolver {
.withCopyFileToContainer(MountableFile.forHostPath(jar), "/opt/keycloak/providers/metrics.jar")
.withLogConsumer(out -> System.out.print(out.getUtf8String()))
.withStartupTimeout(Duration.parse(timeout))
.waitingFor(Wait.forHttp("/health").forPort(8080))
.waitingFor(Wait.forHttp("/health").forPort(8080).withStartupTimeout(Duration.ofMinutes(5)))
.withCommand("start-dev");
try {
container.start();