1import ./make-test-python.nix (
2 { lib, pkgs, ... }:
3
4 {
5 name = "crabfit";
6
7 meta.maintainers = [ ];
8
9 nodes = {
10 machine =
11 { pkgs, ... }:
12 {
13 services.crabfit = {
14 enable = true;
15
16 frontend.host = "http://127.0.0.1:3001";
17 api.host = "127.0.0.1:3000";
18 };
19 };
20 };
21
22 # TODO: Add a reverse proxy and a dns entry for testing
23 testScript = ''
24 machine.wait_for_unit("crabfit-api")
25 machine.wait_for_unit("crabfit-frontend")
26
27 machine.wait_for_open_port(3000)
28 machine.wait_for_open_port(3001)
29
30 machine.succeed("curl -f http://localhost:3001/")
31 '';
32 }
33)