nixosTests.tinyproxy: init

Thomas ae31454d 1ed6468c

Changed files
+23
nixos
pkgs
tools
networking
tinyproxy
+1
nixos/tests/all-tests.nix
···
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
nixos/tests/tinyproxy.nix
···
+
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
pkgs/tools/networking/tinyproxy/default.nix
···
, fetchpatch
, autoreconfHook
, perl
+
, nixosTests
, withDebug ? false
}:
···
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/";