Merge pull request #61604 from basvandijk/tinydns-nixos-test
nixos: add test for tinydns
This commit is contained in:
commit
240ae5eb87
2 changed files with 27 additions and 0 deletions
|
@ -236,6 +236,7 @@ in
|
|||
pdns-recursor = handleTest ./pdns-recursor.nix {};
|
||||
taskserver = handleTest ./taskserver.nix {};
|
||||
telegraf = handleTest ./telegraf.nix {};
|
||||
tinydns = handleTest ./tinydns.nix {};
|
||||
tomcat = handleTest ./tomcat.nix {};
|
||||
tor = handleTest ./tor.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 a new issue