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 {}; tang = handleTest ./tang.nix {};
taskserver = handleTest ./taskserver.nix {}; taskserver = handleTest ./taskserver.nix {};
tayga = handleTest ./tayga.nix {}; tayga = handleTest ./tayga.nix {};
technitium-dns-server = handleTest ./technitium-dns-server.nix {};
teeworlds = handleTest ./teeworlds.nix {}; teeworlds = handleTest ./teeworlds.nix {};
telegraf = handleTest ./telegraf.nix {}; telegraf = handleTest ./telegraf.nix {};
teleport = handleTest ./teleport.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, fetchurl,
makeWrapper, makeWrapper,
dotnet-sdk_8, dotnet-sdk_8,
nixosTests,
}: }:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "technitium-dns-server"; pname = "technitium-dns-server";
@ -35,6 +36,10 @@ stdenvNoCC.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
passthru.tests = {
inherit (nixosTests) technitium-dns-server;
};
meta = { meta = {
changelog = "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md"; changelog = "https://github.com/TechnitiumSoftware/DnsServer/blob/master/CHANGELOG.md";
description = "Authorative and Recursive DNS server for Privacy and Security"; description = "Authorative and Recursive DNS server for Privacy and Security";