summaryrefslogtreecommitdiffstats
path: root/nixos/tests/coder.nix
blob: a13aba87b97afea51e1e8c7a4875440c13212337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ pkgs, ... }:
{
  name = "coder";
  meta.maintainers = pkgs.coder.meta.maintainers;

  nodes.machine =
    { pkgs, ... }:
    {
      services.coder = {
        enable = true;
        accessUrl = "http://localhost:3000";
      };
    };

  testScript = ''
    machine.start()
    machine.wait_for_unit("postgresql.target")
    machine.wait_for_unit("coder.service")
    machine.wait_for_open_port(3000)

    machine.succeed("curl --fail http://localhost:3000")
  '';
}