forked from mirrors/nixpkgs
Merge pull request #73059 from flokli/nixos-test-port-tinydns
nixos/tinydns: port test to python
This commit is contained in:
commit
488e6b7a23
|
@ -37,6 +37,7 @@ with lib;
|
||||||
systemd.services.tinydns = {
|
systemd.services.tinydns = {
|
||||||
description = "djbdns tinydns server";
|
description = "djbdns tinydns server";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
path = with pkgs; [ daemontools djbdns ];
|
path = with pkgs; [ daemontools djbdns ];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
rm -rf /var/lib/tinydns
|
rm -rf /var/lib/tinydns
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ lib, ...} : {
|
import ./make-test-python.nix ({ lib, ...} : {
|
||||||
name = "tinydns";
|
name = "tinydns";
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = with lib.maintainers; [ basvandijk ];
|
maintainers = with lib.maintainers; [ basvandijk ];
|
||||||
|
@ -19,8 +19,8 @@ import ./make-test.nix ({ lib, ...} : {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
testScript = ''
|
testScript = ''
|
||||||
$nameserver->start;
|
nameserver.start()
|
||||||
$nameserver->waitForUnit("tinydns.service");
|
nameserver.wait_for_unit("tinydns.service")
|
||||||
$nameserver->succeed("host bla.foo.bar | grep '1\.2\.3\.4'");
|
nameserver.succeed("host bla.foo.bar | grep '1\.2\.3\.4'")
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue