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 = {
description = "djbdns tinydns server";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
path = with pkgs; [ daemontools djbdns ];
preStart = ''
rm -rf /var/lib/tinydns

View file

@ -1,4 +1,4 @@
import ./make-test.nix ({ lib, ...} : {
import ./make-test-python.nix ({ lib, ...} : {
name = "tinydns";
meta = {
maintainers = with lib.maintainers; [ basvandijk ];
@ -19,8 +19,8 @@ import ./make-test.nix ({ lib, ...} : {
};
};
testScript = ''
$nameserver->start;
$nameserver->waitForUnit("tinydns.service");
$nameserver->succeed("host bla.foo.bar | grep '1\.2\.3\.4'");
nameserver.start()
nameserver.wait_for_unit("tinydns.service")
nameserver.succeed("host bla.foo.bar | grep '1\.2\.3\.4'")
'';
})