Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixosTests.avahi: add avahi-with-resolved #100267

Merged
merged 1 commit into from Oct 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Expand Up @@ -26,6 +26,7 @@ in
agda = handleTest ./agda.nix {};
atd = handleTest ./atd.nix {};
avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
babeld = handleTest ./babeld.nix {};
bazarr = handleTest ./bazarr.nix {};
bcachefs = handleTestOn ["x86_64-linux"] ./bcachefs.nix {}; # linux-4.18.2018.10.12 is unsupported on aarch64
Expand Down
13 changes: 12 additions & 1 deletion nixos/tests/avahi.nix
@@ -1,5 +1,11 @@
{ system ? builtins.currentSystem
, config ? {}
, pkgs ? import ../.. { inherit system config; }
# bool: whether to use networkd in the tests
, networkd ? false }:

# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
import ./make-test-python.nix ({ pkgs, ... } : {
import ./make-test-python.nix ({ ... } : {
name = "avahi";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ eelco ];
Expand All @@ -17,6 +23,11 @@ import ./make-test-python.nix ({ pkgs, ... } : {
publish.workstation = true;
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
} // pkgs.lib.optionalAttrs (networkd) {
networking = {
useNetworkd = true;
useDHCP = false;
};
};
in {
one = cfg;
Expand Down