2024-05-17 15:41:25 +03:00
|
|
|
{ nixosTest, keycloak }:
|
2022-08-28 17:05:18 +03:00
|
|
|
|
|
|
|
nixosTest {
|
|
|
|
name = "keycloak";
|
|
|
|
nodes.machine.services.keycloak = {
|
|
|
|
enable = true;
|
2024-05-17 15:41:25 +03:00
|
|
|
package = keycloak;
|
2022-08-28 17:05:18 +03:00
|
|
|
database.passwordFile = builtins.toFile "keycloak-test-password" "kcnixostest1234";
|
|
|
|
settings = {
|
2024-11-09 00:54:34 +02:00
|
|
|
http-enabled = true;
|
|
|
|
proxy-headers = "xforwarded";
|
2022-08-28 17:05:18 +03:00
|
|
|
hostname = "keycloak.local";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_unit("keycloak.service")
|
2022-12-17 15:40:13 +02:00
|
|
|
machine.wait_for_open_port(80)
|
2022-08-28 17:05:18 +03:00
|
|
|
machine.succeed("curl --fail http://127.0.0.1:80")
|
|
|
|
'';
|
|
|
|
}
|