tests: fix website test
Some checks failed
Flake checks / Check (pull_request) Failing after 2m17s

This commit is contained in:
b12f 2024-08-25 04:19:17 +02:00
parent 6ac401da21
commit fbb9dd8f17
Signed by: b12f
GPG key ID: 729956E1124F8F26
3 changed files with 40 additions and 17 deletions

View file

@ -7,7 +7,7 @@
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"www.${config.pub-solar-os.networking.domain}" = { "www.${config.pub-solar-os.networking.domain}" = {
enableACME = true; enableACME = true;
addSSL = true; forceSSL = true;
extraConfig = '' extraConfig = ''
error_log /dev/null; error_log /dev/null;

View file

@ -63,8 +63,6 @@ in
}; };
}; };
enableOCR = true;
testScript = testScript =
{ nodes, ... }: { nodes, ... }:
let let

View file

@ -13,22 +13,47 @@
node.pkgs = pkgs; node.pkgs = pkgs;
node.specialArgs = self.outputs.nixosConfigurations.nachtigall._module.specialArgs; node.specialArgs = self.outputs.nixosConfigurations.nachtigall._module.specialArgs;
nodes.nachtigall_test = { nodes = {
imports = [ acme-server = {
self.nixosModules.home-manager imports = [
self.nixosModules.core self.nixosModules.home-manager
self.nixosModules.nginx self.nixosModules.core
self.nixosModules.keycloak ./support/ca.nix
]; ];
};
nachtigall = {
imports = [
self.nixosModules.home-manager
self.nixosModules.core
self.nixosModules.nginx
self.nixosModules.nginx-website
./support/global.nix
];
virtualisation.memorySize = 4096;
networking.interfaces.eth0.ipv4.addresses = [
{
address = "192.168.1.3";
prefixLength = 32;
}
];
};
}; };
enableOCR = true;
testScript = '' testScript = ''
nachtigall_test.wait_for_unit("system.slice") start_all()
nachtigall_test.succeed("ping 127.0.0.1 -c 2")
nachtigall_test.wait_for_unit("nginx.service") acme_server.wait_for_unit("system.slice")
nachtigall_test.succeed("curl https://test.pub.solar/") acme_server.wait_for_unit("step-ca.service")
nachtigall_test.succeed("curl https://www.test.pub.solar/") acme_server.succeed("ping ca.test.pub.solar -c 2")
acme_server.wait_until_succeeds("curl 127.0.0.1:443")
nachtigall.wait_for_unit("system.slice")
nachtigall.succeed("ping test.pub.solar -c 2")
nachtigall.succeed("ping ca.test.pub.solar -c 2")
nachtigall.wait_for_unit("nginx.service")
nachtigall.wait_until_succeeds("curl https://test.pub.solar/")
''; '';
} }