nixosTests.avahi: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-13 23:57:19 +01:00
parent b1d55f037e
commit 68995c0969
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 15 additions and 12 deletions

View file

@ -187,8 +187,14 @@ in {
authelia = runTest ./authelia.nix;
auto-cpufreq = runTest ./auto-cpufreq.nix;
autobrr = runTest ./autobrr.nix;
avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };
avahi = runTest {
imports = [ ./avahi.nix ];
_module.args.networkd = false;
};
avahi-with-resolved = runTest {
imports = [ ./avahi.nix ];
_module.args.networkd = true;
};
ayatana-indicators = runTest ./ayatana-indicators.nix;
babeld = runTest ./babeld.nix;
bazarr = handleTest ./bazarr.nix {};

View file

@ -1,17 +1,14 @@
{
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../.. { inherit system config; },
pkgs,
# bool: whether to use networkd in the tests
networkd ? false,
}@args:
...
}:
# Test whether `avahi-daemon' and `libnss-mdns' work as expected.
import ./make-test-python.nix {
{
name = "avahi";
meta = with pkgs.lib.maintainers; {
maintainers = [ ];
};
meta.maintainers = [ ];
nodes =
let
@ -29,7 +26,7 @@ import ./make-test-python.nix {
extraServiceFiles.ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
};
}
// pkgs.lib.optionalAttrs (networkd) {
// pkgs.lib.optionalAttrs networkd {
networking = {
useNetworkd = true;
useDHCP = false;
@ -84,4 +81,4 @@ import ./make-test-python.nix {
one.log(one.execute("systemd-analyze security avahi-daemon.service | grep -v ")[1])
'';
} args
}