mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
add test for networking.networkservices
This commit is contained in:
parent
5c18e86a07
commit
4608964b30
3 changed files with 17 additions and 1 deletions
|
@ -91,7 +91,8 @@ let
|
|||
|
||||
tests.environment-path = makeTest ./tests/environment-path.nix;
|
||||
tests.launchd-setenv = makeTest ./tests/launchd-setenv.nix;
|
||||
tests.networking = makeTest ./tests/networking.nix;
|
||||
tests.networking-hostname = makeTest ./tests/networking-hostname.nix;
|
||||
tests.networking-networkservices = makeTest ./tests/networking-networkservices.nix;
|
||||
tests.nixpkgs-overlays = makeTest ./tests/nixpkgs-overlays.nix;
|
||||
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
||||
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
||||
|
|
15
tests/networking-networkservices.nix
Normal file
15
tests/networking-networkservices.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.networkservices = [ "Wi-Fi" "Thunderbolt Ethernet" ];
|
||||
networking.dns = [ "8.8.8.8" "8.8.4.4" ];
|
||||
|
||||
test = ''
|
||||
echo checking dns settings in /activate >&2
|
||||
grep "networksetup -setdnsservers 'Wi-Fi' '8.8.8.8' '8.8.4.4'" ${config.out}/activate
|
||||
grep "networksetup -setdnsservers 'Thunderbolt Ethernet' '8.8.8.8' '8.8.4.4'" ${config.out}/activate
|
||||
echo checking empty searchdomain settings in /activate >&2
|
||||
grep "networksetup -setsearchdomains 'Wi-Fi' 'empty'" ${config.out}/activate
|
||||
grep "networksetup -setsearchdomains 'Thunderbolt Ethernet' 'empty'" ${config.out}/activate
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue