nixos/quicktun: add test

This commit is contained in:
h7x4 2023-11-01 19:48:51 +01:00
parent 5672d3d8b8
commit 78f663bc0b
No known key found for this signature in database
GPG Key ID: 9F2F7D8250F35146
3 changed files with 22 additions and 1 deletions

View File

@ -692,6 +692,7 @@ in {
qgis-ltr = handleTest ./qgis.nix { qgisPackage = pkgs.qgis-ltr; };
qownnotes = handleTest ./qownnotes.nix {};
quake3 = handleTest ./quake3.nix {};
quicktun = handleTest ./quicktun.nix {};
quorum = handleTest ./quorum.nix {};
rabbitmq = handleTest ./rabbitmq.nix {};
radarr = handleTest ./radarr.nix {};

18
nixos/tests/quicktun.nix Normal file
View File

@ -0,0 +1,18 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
{
name = "quicktun";
meta.maintainers = with lib.maintainers; [ h7x4 ];
nodes = {
machine = { ... }: {
services.quicktun."test-tunnel" = {
protocol = "raw";
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("quicktun-test-tunnel.service")
'';
})

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, libsodium }:
{ lib, stdenv, fetchFromGitHub, libsodium, nixosTests }:
stdenv.mkDerivation {
pname = "quicktun";
@ -22,6 +22,8 @@ stdenv.mkDerivation {
install -vD out/quicktun* -t $out/bin
'';
passthru.tests.quicktun = nixosTests.quicktun;
meta = with lib; {
broken = stdenv.isDarwin;
description = "Very simple, yet secure VPN software";