diff options
author | Cameron Nemo <cnemo@tutanota.com> | 2021-08-27 19:28:27 -0700 |
---|---|---|
committer | Cameron Nemo <cnemo@tutanota.com> | 2022-04-07 14:43:53 +0000 |
commit | 1b4b16e1bdc75fe881494b9341c482e9c63174bf (patch) | |
tree | 6b0d16c6c220b68c58bc48c318ed76d6e6423eb0 /nixos/tests/envoy.nix | |
parent | 666a90e29d6261fd17fab0481ac21c64cd857834 (diff) |
nixos/envoy: init
Diffstat (limited to 'nixos/tests/envoy.nix')
-rw-r--r-- | nixos/tests/envoy.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixos/tests/envoy.nix b/nixos/tests/envoy.nix new file mode 100644 index 0000000000000..9d2c32ce102f2 --- /dev/null +++ b/nixos/tests/envoy.nix @@ -0,0 +1,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") + ''; +}) |