Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump org.keycloak:keycloak-quarkus-server from 26.0.5 to 26.0.6 #179

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<version.io.kokuwa.keycloak.metrics>1.0.0</version.io.kokuwa.keycloak.metrics>
<version.io.kokuwa.maven.k3s>1.3.0</version.io.kokuwa.maven.k3s>
<version.io.kubernetes.client>19.0.0</version.io.kubernetes.client>
<version.org.keycloak>25.0.6</version.org.keycloak>
<version.org.keycloak>26.0.6</version.org.keycloak>

<!-- images -->

Expand Down
10 changes: 4 additions & 6 deletions src/test/java/io/kokuwa/keycloak/FailoverIT.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.kokuwa.keycloak;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertThrows;

import java.util.stream.IntStream;

Expand All @@ -13,7 +12,6 @@
import io.kokuwa.keycloak.k8s.KubernetesExtension;
import io.kokuwa.keycloak.keycloak.KeycloakExtension;
import io.kokuwa.keycloak.keycloak.OpenIDConnect;
import jakarta.ws.rs.NotAuthorizedException;

@DisplayName("failover")
@ExtendWith(KubernetesExtension.class)
Expand All @@ -40,9 +38,9 @@ void rollingRestart(Kubernetes kubernetes, OpenIDConnect oidc) {
"session should be available after restart"));
}

@DisplayName("session should be lost after scaling keycloak to 0")
@DisplayName("session should remain after scaling keycloak to 0")
@Test
void sessionLost(Kubernetes kubernetes, OpenIDConnect oidc) {
void sessionRemains(Kubernetes kubernetes, OpenIDConnect oidc) {

// get token and validate on userinfo endpoint

Expand All @@ -54,8 +52,8 @@ void sessionLost(Kubernetes kubernetes, OpenIDConnect oidc) {
kubernetes.scaleKeycloak(0);
kubernetes.scaleKeycloak(Kubernetes.KEYCLOAK_REPLICAS);

// try to validate old token, should fail because session was lost
// try to validate old token, should be fine because session should be stored since KeyCloak >= 26

assertThrows(NotAuthorizedException.class, () -> oidc.userinfo("test", token), "session should be lost");
assertDoesNotThrow(() -> oidc.userinfo("test", token), "session should still be valid");
}
}
Loading