Merge pull request #61604 from basvandijk/tinydns-nixos-test
nixos: add test for tinydns
This commit is contained in:
commit
240ae5eb87
@ -236,6 +236,7 @@ in
|
|||||||
pdns-recursor = handleTest ./pdns-recursor.nix {};
|
pdns-recursor = handleTest ./pdns-recursor.nix {};
|
||||||
taskserver = handleTest ./taskserver.nix {};
|
taskserver = handleTest ./taskserver.nix {};
|
||||||
telegraf = handleTest ./telegraf.nix {};
|
telegraf = handleTest ./telegraf.nix {};
|
||||||
|
tinydns = handleTest ./tinydns.nix {};
|
||||||
tomcat = handleTest ./tomcat.nix {};
|
tomcat = handleTest ./tomcat.nix {};
|
||||||
tor = handleTest ./tor.nix {};
|
tor = handleTest ./tor.nix {};
|
||||||
transmission = handleTest ./transmission.nix {};
|
transmission = handleTest ./transmission.nix {};
|
||||||
|
26
nixos/tests/tinydns.nix
Normal file
26
nixos/tests/tinydns.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import ./make-test.nix ({ lib, ...} : {
|
||||||
|
name = "tinydns";
|
||||||
|
meta = {
|
||||||
|
maintainers = with lib.maintainers; [ basvandijk ];
|
||||||
|
};
|
||||||
|
nodes = {
|
||||||
|
nameserver = { config, lib, ... } : let
|
||||||
|
ip = (lib.head config.networking.interfaces.eth1.ipv4.addresses).address;
|
||||||
|
in {
|
||||||
|
networking.nameservers = [ ip ];
|
||||||
|
services.tinydns = {
|
||||||
|
enable = true;
|
||||||
|
inherit ip;
|
||||||
|
data = ''
|
||||||
|
.foo.bar:${ip}
|
||||||
|
+.bla.foo.bar:1.2.3.4:300
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
testScript = ''
|
||||||
|
$nameserver->start;
|
||||||
|
$nameserver->waitForUnit("tinydns.service");
|
||||||
|
$nameserver->succeed("host bla.foo.bar | grep '1\.2\.3\.4'");
|
||||||
|
'';
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user