diff options
author | talyz <kim.lindberger@gmail.com> | 2020-10-26 15:33:57 +0100 |
---|---|---|
committer | talyz <kim.lindberger@gmail.com> | 2020-10-29 12:47:10 +0100 |
commit | 89e83833af35bd0ec3fdc65c435358a676a41d89 (patch) | |
tree | c20f0b9e9d9ffb409d96a55aaeb6dc47c6dca420 /nixos/tests/keycloak.nix | |
parent | d1d3c86c70cad38944f50f7be544326133fff292 (diff) | |
download | nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.tar nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.tar.gz nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.tar.bz2 nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.tar.lz nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.tar.xz nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.tar.zst nixpkgs-89e83833af35bd0ec3fdc65c435358a676a41d89.zip |
nixos/keycloak: Add support for MySQL and external DBs with SSL
- Add support for using MySQL as an option to PostgreSQL. - Enable connecting to external DBs with SSL - Add a database port config option
Diffstat (limited to 'nixos/tests/keycloak.nix')
-rw-r--r-- | nixos/tests/keycloak.nix | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/nixos/tests/keycloak.nix b/nixos/tests/keycloak.nix index e5e31b038e9..f448a0f7095 100644 --- a/nixos/tests/keycloak.nix +++ b/nixos/tests/keycloak.nix @@ -2,12 +2,12 @@ # OIDC client and a user, and simulates the user logging in to the # client using their Keycloak login. -import ./make-test-python.nix ( - { pkgs, ... }: - let - frontendUrl = "http://keycloak/auth"; - initialAdminPassword = "h4IhoJFnt2iQIR9"; - in +let + frontendUrl = "http://keycloak/auth"; + initialAdminPassword = "h4IhoJFnt2iQIR9"; + + keycloakTest = import ./make-test-python.nix ( + { pkgs, databaseType, ... }: { name = "keycloak"; meta = with pkgs.stdenv.lib.maintainers; { @@ -19,7 +19,7 @@ import ./make-test-python.nix ( virtualisation.memorySize = 1024; services.keycloak = { enable = true; - inherit frontendUrl initialAdminPassword; + inherit frontendUrl databaseType initialAdminPassword; databasePasswordFile = pkgs.writeText "dbPassword" "wzf6vOCbPp6cqTH"; }; environment.systemPackages = with pkgs; [ @@ -136,4 +136,9 @@ import ./make-test-python.nix ( ) ''; } -) + ); +in +{ + postgres = keycloakTest { databaseType = "postgresql"; }; + mysql = keycloakTest { databaseType = "mysql"; }; +} |