diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-01-08 00:25:26 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-01-08 00:31:52 +0100 |
| commit | 4608964b30ed01068c43aa9028aa7beb99bc9a96 (patch) | |
| tree | b44373d0cea10ee8acb463602ec07a05a8d3ee3c /tests/networking-hostname.nix | |
| parent | 5c18e86a07a2aec40b97829b1c2d2744e657efff (diff) | |
add test for networking.networkservices
Diffstat (limited to 'tests/networking-hostname.nix')
| -rw-r--r-- | tests/networking-hostname.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/networking-hostname.nix b/tests/networking-hostname.nix new file mode 100644 index 0000000..f89277a --- /dev/null +++ b/tests/networking-hostname.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + networking.hostName = "EVE"; + + test = '' + echo checking hostname 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 + echo checking defaults write in ${config.out}/activate-user >&2 + grep "defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server 'NetBIOSName' -string 'EVE'" ${config.out}/activate-user + ''; +} |
