checks/keycloak: move to separate file

This commit is contained in:
Max Headroom 2022-08-28 16:05:18 +02:00
parent a0adf14bff
commit 43c78db859
2 changed files with 21 additions and 19 deletions

View file

@ -1,25 +1,8 @@
{ filters, inputs', pkgs, self', ... }:
let
inherit (pkgs) nixosTest;
in
{
checks = filters.doFilter filters.checks {
keycloak = nixosTest {
name = "keycloak";
nodes.machine.services.keycloak = {
enable = true;
package = pkgs.keycloak.override { jre = self'.packages.jre17_standard; };
database.passwordFile = builtins.toFile "keycloak-test-password" "kcnixostest1234";
settings = {
proxy = "edge";
hostname = "keycloak.local";
};
};
testScript = ''
machine.wait_for_unit("keycloak.service")
machine.wait_for_open_port("80")
machine.succeed("curl --fail http://127.0.0.1:80")
'';
keycloak = pkgs.callPackage ./keycloak-custom-jre.nix {
jre = self'.packages.jre17_standard;
};
};
}

View file

@ -0,0 +1,19 @@
{ nixosTest, keycloak, jre }:
nixosTest {
name = "keycloak";
nodes.machine.services.keycloak = {
enable = true;
package = keycloak.override { inherit jre; };
database.passwordFile = builtins.toFile "keycloak-test-password" "kcnixostest1234";
settings = {
proxy = "edge";
hostname = "keycloak.local";
};
};
testScript = ''
machine.wait_for_unit("keycloak.service")
machine.wait_for_open_port("80")
machine.succeed("curl --fail http://127.0.0.1:80")
'';
}