summaryrefslogtreecommitdiffstats
path: root/nixos/tests/tinyproxy.nix
blob: c1bcd04285036e725f584ef886c58ba802e5de05 (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 = "tinyproxy";

  nodes.machine =
    { config, pkgs, ... }:
    {
      services.tinyproxy = {
        enable = true;
        settings = {
          Listen = "127.0.0.1";
          Port = 8080;
        };
      };
    };

  testScript = ''
    machine.wait_for_unit("tinyproxy.service")
    machine.wait_for_open_port(8080)

    machine.succeed('curl -s http://localhost:8080 |grep -i tinyproxy')
  '';
}