1 import ./make-test-python.nix ({ pkgs, lib, ...} : {
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ cameronnemo ];
7 nodes.machine = { pkgs, ... }: {
8 services.envoy.enable = true;
9 services.envoy.settings = {
11 access_log_path = "/dev/null";
15 address = "127.0.0.1";
26 withoutConfigValidation.configuration = { ... }: {
28 requireValidConfig = false;
29 settings.admin.access_log_path = lib.mkForce "/var/log/envoy/access.log";
35 testScript = { nodes, ... }:
37 specialisations = "${nodes.machine.system.build.toplevel}/specialisation";
42 with subtest("envoy.service starts and responds with ready"):
43 machine.wait_for_unit("envoy.service")
44 machine.wait_for_open_port(80)
45 machine.wait_until_succeeds("curl -fsS localhost:80/ready")
47 with subtest("envoy.service works with config path not available at eval time"):
48 machine.succeed('${specialisations}/withoutConfigValidation/bin/switch-to-configuration test')
49 machine.wait_for_unit("envoy.service")
50 machine.wait_for_open_port(80)
51 machine.wait_until_succeeds("curl -fsS localhost:80/ready")
52 machine.succeed('test -f /var/log/envoy/access.log')