depot/packages/tests/default.nix

26 lines
716 B
Nix
Raw Normal View History

2022-07-31 16:09:40 +03:00
{ filters, inputs', pkgs, self', ... }:
2022-05-31 12:38:38 +03:00
let
inherit (pkgs) nixosTest;
in
{
2022-07-31 16:09:40 +03:00
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";
};
2022-05-31 12:40:00 +03:00
};
2022-07-31 16:09:40 +03:00
testScript = ''
machine.wait_for_unit("keycloak.service")
machine.wait_for_open_port("80")
machine.succeed("curl --fail http://127.0.0.1:80")
'';
2022-05-31 12:40:00 +03:00
};
};
2022-05-31 12:38:38 +03:00
}