diff options
author | pennae <82953136+pennae@users.noreply.github.com> | 2022-04-07 16:23:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 16:23:12 +0000 |
commit | 3838b7e07e8a79ece6cb249eb4bf0a2bfd6d388a (patch) | |
tree | c5e2544d029b17a3d22ffc059a5bf1dae63c2e48 /nixos/tests | |
parent | a62b1ef97740fb0814a088a53ae1057b63075a89 (diff) | |
parent | 1b4b16e1bdc75fe881494b9341c482e9c63174bf (diff) |
Merge pull request #166894 from CameronNemo/nixos-mod-envoy
nixos/envoy: init
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/envoy.nix | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 799ce9b4017e9..d9429920f13b2 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -142,6 +142,7 @@ in engelsystem = handleTest ./engelsystem.nix {}; enlightenment = handleTest ./enlightenment.nix {}; env = handleTest ./env.nix {}; + envoy = handleTest ./envoy.nix {}; ergo = handleTest ./ergo.nix {}; ergochat = handleTest ./ergochat.nix {}; etc = pkgs.callPackage ../modules/system/etc/test.nix { inherit evalMinimalConfig; }; 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") + ''; +}) |