1
0
Fork 0
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:
Daiderd Jordan 2018-01-08 00:25:26 +01:00
parent 5c18e86a07
commit 4608964b30
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 17 additions and 1 deletions

View file

@ -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;

View 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
'';
}