nixos/modules: add technitium-dns-server tests

This commit is contained in:
Pol Dellaiera 2024-04-04 08:35:07 +02:00
parent 537d34da58
commit e7cc626902
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA
3 changed files with 27 additions and 0 deletions

View File

@ -916,6 +916,7 @@ in {
tang = handleTest ./tang.nix {};
taskserver = handleTest ./taskserver.nix {};
tayga = handleTest ./tayga.nix {};
technitium-dns-server = handleTest ./technitium-dns-server.nix {};
teeworlds = handleTest ./teeworlds.nix {};
telegraf = handleTest ./telegraf.nix {};
teleport = handleTest ./teleport.nix {};

View File

@ -0,0 +1,21 @@
import ./make-test-python.nix ({pkgs, lib, ...}:
{
name = "technitium-dns-server";
nodes = {
machine = {pkgs, ...}: {
services.technitium-dns-server = {
enable = true;
openFirewall = true;
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("technitium-dns-server.service")
machine.wait_for_open_port(53)
'';
meta.maintainers = with lib.maintainers; [ fabianrig ];
})

View File

@ -4,6 +4,7 @@
fetchurl,
makeWrapper,
dotnet-sdk_8,
nixosTests,
}:
stdenvNoCC.mkDerivation rec {
pname = "technitium-dns-server";
@ -35,6 +36,10 @@ stdenvNoCC.mkDerivation rec {
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests) technitium-dns-server;
};
meta = {
changelog = "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md";
description = "Authorative and Recursive DNS server for Privacy and Security";