diff options
author | Tom Hubrecht <tom@hubrecht.ovh> | 2024-04-02 12:16:53 +0200 |
---|---|---|
committer | Tom Hubrecht <tom@hubrecht.ovh> | 2024-04-13 18:51:02 +0200 |
commit | 96659af197072c921c6063021788ad5d32fb6b3f (patch) | |
tree | a3dc88632627d6add6a1279295cef3498c45cb6b /nixos/tests/crabfit.nix | |
parent | 600fcb2070fc30ff978dcf6fb57d81c6212b4aac (diff) |
nixos/crabfit: init
Diffstat (limited to 'nixos/tests/crabfit.nix')
-rw-r--r-- | nixos/tests/crabfit.nix | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/nixos/tests/crabfit.nix b/nixos/tests/crabfit.nix new file mode 100644 index 0000000000000..0cd0741f6fa4b --- /dev/null +++ b/nixos/tests/crabfit.nix @@ -0,0 +1,33 @@ +import ./make-test-python.nix ( + { lib, pkgs, ... }: + + { + name = "crabfit"; + + meta.maintainers = with lib.maintainers; [ thubrecht ]; + + nodes = { + machine = + { pkgs, ... }: + { + services.crabfit = { + enable = true; + + frontend.host = "http://127.0.0.1:3001"; + api.host = "127.0.0.1:3000"; + }; + }; + }; + + # TODO: Add a reverse proxy and a dns entry for testing + testScript = '' + machine.wait_for_unit("crabfit-api") + machine.wait_for_unit("crabfit-frontend") + + machine.wait_for_open_port(3000) + machine.wait_for_open_port(3001) + + machine.succeed("curl -f http://localhost:3001/") + ''; + } +) |