about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/envoy.nix
blob: 9d2c32ce102f2a4bd0ce7473275c4c3ff568361a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ./make-test-python.nix ({ pkgs, lib, ...} : {
  name = "envoy";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ cameronnemo ];
  };

  nodes.machine = { pkgs, ... }: {
    services.envoy.enable = true;
    services.envoy.settings = {
      admin = {
        access_log_path = "/dev/null";
        address = {
          socket_address = {
            protocol = "TCP";
            address = "127.0.0.1";
            port_value = 9901;
          };
        };
      };
      static_resources = {
        listeners = [];
        clusters = [];
      };
    };
  };

  testScript = ''
    machine.start()
    machine.wait_for_unit("envoy.service")
    machine.wait_for_open_port(9901)
    machine.wait_until_succeeds("curl -fsS localhost:9901/ready")
  '';
})