checks/keycloak: move to separate file
This commit is contained in:
parent
a0adf14bff
commit
43c78db859
2 changed files with 21 additions and 19 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
19
packages/tests/keycloak-custom-jre.nix
Normal file
19
packages/tests/keycloak-custom-jre.nix
Normal 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")
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue