nixos/tests/avahi: add test for extra service definitions

This commit is contained in:
WilliButz 2019-06-04 00:21:51 +02:00
parent 229e7834eb
commit dbf4be4642
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2

View file

@ -15,6 +15,7 @@ import ./make-test.nix ({ pkgs, ... } : {
publish.enable = true;
publish.userServices = true;
publish.workstation = true;
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
};
in {
@ -56,5 +57,11 @@ import ./make-test.nix ({ pkgs, ... } : {
$one->succeed("getent hosts two.local >&2");
$two->succeed("getent hosts one.local >&2");
$two->succeed("getent hosts two.local >&2");
# extra service definitions
$one->succeed("avahi-browse -r -t _ssh._tcp | tee out >&2");
$one->succeed("test `wc -l < out` -gt 0");
$two->succeed("avahi-browse -r -t _ssh._tcp | tee out >&2");
$two->succeed("test `wc -l < out` -gt 0");
'';
})