infra/tests/website.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
658 B
Nix
Raw Normal View History

2024-04-28 15:25:40 +00:00
{
self,
pkgs,
lib,
config,
...
}:
{
name = "website";
2024-08-23 20:50:22 +00:00
hostPkgs = pkgs;
2024-04-28 15:25:40 +00:00
2024-08-23 20:50:22 +00:00
node.pkgs = pkgs;
2024-04-28 15:25:40 +00:00
node.specialArgs = self.outputs.nixosConfigurations.nachtigall._module.specialArgs;
2024-08-23 20:50:22 +00:00
nodes.nachtigall-test = {
imports = [
self.nixosModules.home-manager
self.nixosModules.core
self.nixosModules.nginx
self.nixosModules.nginx-website
];
};
2024-04-28 15:25:40 +00:00
enableOCR = true;
testScript = ''
2024-08-23 20:50:22 +00:00
nachtigall_test.wait_for_unit("system.slice")
nachtigall_test.succeed("ping 127.0.0.1 -c 2")
nachtigall_test.wait_for_unit("nginx.service")
nachtigall_test.succeed("curl -H 'Host:pub.solar' http://127.0.0.1/")
2024-04-28 15:25:40 +00:00
'';
}