infra/tests/website.nix

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

82 lines
1.7 KiB
Nix
Raw Normal View History

2024-04-28 15:25:40 +00:00
{
<<<<<<< HEAD
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
2024-08-25 02:19:17 +00:00
nodes = {
acme-server = {
imports = [
self.nixosModules.home-manager
self.nixosModules.core
./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;
2024-04-28 15:25:40 +00:00
2024-08-25 02:19:17 +00:00
networking.interfaces.eth0.ipv4.addresses = [
{
address = "192.168.1.3";
prefixLength = 32;
}
];
};
};
2024-04-28 15:25:40 +00:00
testScript = ''
2024-08-25 02:19:17 +00:00
start_all()
acme_server.wait_for_unit("system.slice")
acme_server.wait_for_unit("step-ca.service")
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/")
=======
self,
pkgs,
lib,
config,
...
}: {
name = "website";
nodes.nachtigall-test = self.nixosConfigurations.nachtigall-test;
node.specialArgs = self.outputs.nixosConfigurations.nachtigall._module.specialArgs;
hostPkgs = pkgs;
enableOCR = true;
testScript = ''
machine.wait_for_unit("system.slice")
machine.succeed("ping 127.0.0.1 -c 2")
machine.succeed("ping iregendeinscheiss.de -c 2")
>>>>>>> af599c9 (test: add initial e2e test for nachtigall)
2024-04-28 15:25:40 +00:00
'';
}