mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Closes #47. Adds tests for networking
This commit is contained in:
parent
02a11717a4
commit
062f14eb55
3 changed files with 15 additions and 0 deletions
|
@ -10,6 +10,7 @@ let
|
|||
scutil --set ComputerName "${cfg.hostName}"
|
||||
scutil --set LocalHostName "${cfg.hostName}"
|
||||
scutil --set HostName "${cfg.hostName}"
|
||||
defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string '${cfg.hostName}'
|
||||
'';
|
||||
|
||||
in
|
||||
|
|
|
@ -91,6 +91,7 @@ let
|
|||
|
||||
tests.environment-path = makeTest ./tests/environment-path.nix;
|
||||
tests.launchd-setenv = makeTest ./tests/launchd-setenv.nix;
|
||||
tests.networking = makeTest ./tests/networking.nix;
|
||||
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;
|
||||
tests.system-defaults-write = makeTest ./tests/system-defaults-write.nix;
|
||||
tests.system-packages = makeTest ./tests/system-packages.nix;
|
||||
|
|
13
tests/networking.nix
Normal file
13
tests/networking.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "EVE";
|
||||
|
||||
test = ''
|
||||
echo checking hostname write in /activate >&2
|
||||
grep 'scutil --set ComputerName "EVE"' ${config.out}/activate
|
||||
grep 'scutil --set LocalHostName "EVE"' ${config.out}/activate
|
||||
grep 'scutil --set HostName "EVE"' ${config.out}/activate
|
||||
grep "defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string 'EVE'" ${config.out}/activate
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue