3
0
Fork 0
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:
worldofpeace 2019-11-09 21:53:07 +00:00 committed by GitHub
commit 488e6b7a23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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'")
''; '';
}) })