Skip to content

Commit

Permalink
Upgrade keycloak version
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesarnal committed Jan 20, 2025
1 parent 6e4bd0c commit 462b5b2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

@Tag(Constants.AUTH)
@TestProfile(AuthTestProfile.class)
Expand Down Expand Up @@ -64,7 +65,7 @@ public void testWrongCreds() throws Exception {
var exception = Assertions.assertThrows(Exception.class, () -> {
client.groups().byGroupId("foo").artifacts().get();
});
assertNotAuthorized(exception);
assertTrue(exception.getMessage().contains("unauthorized"));
}

@Test
Expand Down
11 changes: 9 additions & 2 deletions integration-tests/src/test/resources/infra/auth/keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3183,8 +3183,6 @@ spec:
value: "8090"
- name: KC_HOSTNAME_STRICT_BACKCHANNEL
value: "false"
- name: KC_HTTP_RELATIVE_PATH
value: "/auth"
- name: KC_HTTP_PORT
value: "8090"
ports:
Expand All @@ -3211,7 +3209,16 @@ metadata:
spec:
selector:
app: keycloak-deployment
type: LoadBalancer
sessionAffinity: None
externalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
allocateLoadBalancerNodePorts: true
internalTrafficPolicy: Cluster
ports:
- protocol: TCP
port: 8090
targetPort: 8090
nodePort: 32587
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.Network;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.utility.DockerImageName;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -25,12 +26,12 @@ public class KeycloakTestContainerManager implements QuarkusTestResourceLifecycl
@Override
public Map<String, String> start() {

server = new KeycloakContainer().withNetwork(Network.SHARED).withRealmImportFile("/realm.json");
server = new KeycloakContainer(
DockerImageName.parse("quay.io/keycloak/keycloak").withTag("18.0.1").toString())
.withNetwork(Network.SHARED).withRealmImportFile("/realm.json");
server.start();

server.waitingFor(Wait.forLogMessage(
".*[org.keycloak.quarkus.runtime.KeycloakMain] (main) Running the server in development mode.*",
1));
server.waitingFor(Wait.forLogMessage(".*io.quarkus] (main) Keycloak 18.0.1 on JVM.*", 1));

Map<String, String> props = new HashMap<>();

Expand Down

0 comments on commit 462b5b2

Please sign in to comment.