From ac22e5369fae1632b33ce86e53bf6f1f602c30dd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 18 Jun 2010 13:21:01 +0000 Subject: [PATCH] * Prevent tests from accessing the host's network accidentally. For instance, `nixos-rebuild' in the installer test does a `nix-pull' from nixos.org. svn path=/nixos/branches/boot-order/; revision=22325 --- modules/testing/test-instrumentation.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index 5e62c698f27..dd61e68d9d1 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -80,6 +80,10 @@ in # serial port). services.syslogd.extraConfig = "*.*,kern.none /dev/ttyS0"; + # Prevent tests from accessing the Internet. + networking.defaultGateway = mkOverride 50 {} ""; + networking.nameservers = mkOverride 50 {} [ ]; + }; }