diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-12-18 07:09:42 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-12-18 07:09:42 +0100 |
commit | 4c61faa009df175b77148ce587ade14fe9b31b12 (patch) | |
tree | 6a125757d2bb07c84475e90cc3d2e71209c80876 /nixos/tests/networking.nix | |
parent | 662ab05119e88f70d6b43518bffec0bca4bdb474 (diff) | |
download | nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.tar nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.tar.gz nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.tar.bz2 nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.tar.lz nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.tar.xz nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.tar.zst nixpkgs-4c61faa009df175b77148ce587ade14fe9b31b12.zip |
nixos/tests/networking: Add a test for loopback
It serves as a regression test, because right now if you enable networking.useNetworkd the default loopback interface doesn't get assigned any IP addresses. To be sure, I have bisected this and it has been introduced with the update to systemd 228 in 1da87d4. Only the "scripted" networking tests have to succeed in order to trigger a channel update of nixos-unstable, so I'm leaving this test as broken and we have to figure out next what's the *exact* reason for the breakage. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/networking.nix')
-rw-r--r-- | nixos/tests/networking.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/tests/networking.nix b/nixos/tests/networking.nix index 6a7f63702c4..813d7c2bf51 100644 --- a/nixos/tests/networking.nix +++ b/nixos/tests/networking.nix @@ -31,6 +31,17 @@ import ./make-test.nix ({ pkgs, networkd, test, ... }: }; }; testCases = { + loopback = { + name = "Loopback"; + machine.networking.useNetworkd = networkd; + testScript = '' + startAll; + $machine->waitForUnit("network-interfaces.target"); + $machine->waitForUnit("network.target"); + $machine->succeed("ip addr show lo | grep -q 'inet 127.0.0.1/8 '"); + $machine->succeed("ip addr show lo | grep -q 'inet6 ::1/128 '"); + ''; + }; static = { name = "Static"; nodes.router = router; |