nixosTests.tinyproxy: init

This commit is contained in:
Thomas 2023-05-05 21:02:11 +02:00
parent 1ed6468c27
commit ae31454d41
No known key found for this signature in database
GPG key ID: 0E81B43737878B74
3 changed files with 23 additions and 0 deletions

View file

@ -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
nixos/tests/tinyproxy.nix Normal file
View file

@ -0,0 +1,20 @@
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')
'';
})

View file

@ -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/";