diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-12-11 05:26:42 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-12-11 05:26:42 +0100 |
commit | 90c080e455ccd8c9239b40b48960e3a99b11d928 (patch) | |
tree | ffa930010b209a190bf6549cde0852df129714e1 /modules | |
parent | 006d6a6dd58c2e7fa7ddb88ed26b9aa6c1802f29 (diff) |
modules: Add a few basic NixOS networking tests.
This is basically just to get started and for testing whether our idea will actually work out as planned. My gut feeling is that Hydra explicitly needs jobs for these tests, but we'll see. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/module-list.nix | 1 | ||||
-rw-r--r-- | modules/profiles/tests.nix | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/module-list.nix b/modules/module-list.nix index 08d14af5..f45e2451 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -1,5 +1,6 @@ [ ./profiles/common.nix + ./profiles/tests.nix ./services/multipath-vpn.nix ./services/postfix ./system/iso.nix diff --git a/modules/profiles/tests.nix b/modules/profiles/tests.nix new file mode 100644 index 00000000..66ea76e5 --- /dev/null +++ b/modules/profiles/tests.nix @@ -0,0 +1,15 @@ +{ config, lib, tests, ... }: + +with lib; + +let + which = if config.networking.useNetworkd then "networkd" else "scripted"; + networkTests = map (attr: getAttr attr tests.nixos.networking.${which}) [ + "static" "dhcpSimple" "dhcpOneIf" "bond" "bridge" "macvlan" "sit" "vlan" + ]; + +in { + config = { + vuizvui.requiresTests = networkTests; + }; +} |