File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
src/Testcontainers.Keycloak
tests/Testcontainers.Keycloak.Tests Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ private KeycloakBuilder(KeycloakConfiguration resourceConfiguration)
4444 public KeycloakBuilder WithUsername ( string username )
4545 {
4646 return Merge ( DockerResourceConfiguration , new KeycloakConfiguration ( username : username ) )
47+ . WithEnvironment ( "KC_BOOTSTRAP_ADMIN_USERNAME" , username )
4748 . WithEnvironment ( "KEYCLOAK_ADMIN" , username ) ;
4849 }
4950
@@ -55,6 +56,7 @@ public KeycloakBuilder WithUsername(string username)
5556 public KeycloakBuilder WithPassword ( string password )
5657 {
5758 return Merge ( DockerResourceConfiguration , new KeycloakConfiguration ( password : password ) )
59+ . WithEnvironment ( "KC_BOOTSTRAP_ADMIN_PASSWORD" , password )
5860 . WithEnvironment ( "KEYCLOAK_ADMIN_PASSWORD" , password ) ;
5961 }
6062
Original file line number Diff line number Diff line change @@ -65,4 +65,13 @@ public KeycloakV25Configuration()
6565 {
6666 }
6767 }
68+
69+ [ UsedImplicitly ]
70+ public sealed class KeycloakV26Configuration : KeycloakContainerTest
71+ {
72+ public KeycloakV26Configuration ( )
73+ : base ( new KeycloakBuilder ( ) . WithImage ( "quay.io/keycloak/keycloak:26.0" ) . Build ( ) )
74+ {
75+ }
76+ }
6877}
You can’t perform that action at this time.
0 commit comments