Unverified Commit ae31454d authored by Thomas's avatar Thomas
Browse files

nixosTests.tinyproxy: init

parent 1ed6468c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -734,6 +734,7 @@ in {
  timezone = handleTest ./timezone.nix {};
  tinc = handleTest ./tinc {};
  tinydns = handleTest ./tinydns.nix {};
  tinyproxy = handleTest ./tinyproxy.nix {};
  tinywl = handleTest ./tinywl.nix {};
  tmate-ssh-server = handleTest ./tmate-ssh-server.nix { };
  tomcat = handleTest ./tomcat.nix {};
+20 −0
Original line number Diff line number Diff line
import ./make-test-python.nix ({ 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')
  '';
})
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
, fetchpatch
, autoreconfHook
, perl
, nixosTests
, withDebug ? false
}:

@@ -30,6 +31,7 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [ autoreconfHook perl ];

  configureFlags = lib.optionals withDebug [ "--enable-debug" ]; # Enable debugging support code and methods.
  passthru.tests = { inherit (nixosTests) tinyproxy; };

  meta = with lib; {
    homepage = "https://tinyproxy.github.io/";