summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-08-04 17:52:42 +0200
committerRobin Gloster <mail@glob.in>2017-08-04 17:52:42 +0200
commitb18b70c74d5a2eadde6985ee9b2fac3411374eb5 (patch)
tree480f63b9d9a30b00d5920c808ee6ee8e72f3e01c
parent1da02642bcfc46f91bbc3d72dc3e84ded328b9c8 (diff)
downloadnixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.tar
nixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.tar.gz
nixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.tar.bz2
nixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.tar.lz
nixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.tar.xz
nixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.tar.zst
nixlib-b18b70c74d5a2eadde6985ee9b2fac3411374eb5.zip
nixos.tests.nat: fix
-rw-r--r--nixos/tests/nat.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/nat.nix b/nixos/tests/nat.nix
index f1097cdfc49a..a12b7645bc28 100644
--- a/nixos/tests/nat.nix
+++ b/nixos/tests/nat.nix
@@ -102,17 +102,17 @@ import ./make-test.nix ({ pkgs, lib, withFirewall, withConntrackHelpers ? false,
 
         # If we turn off NAT, the client shouldn't be able to reach the server.
         $router->succeed("${routerDummyNoNatClosure}/bin/switch-to-configuration test 2>&1");
-        # FIXME: this should not be necessary, but nat.service is not started because
-        #        network.target is not triggered
-        #        (https://github.com/NixOS/nixpkgs/issues/16230#issuecomment-226408359)
-        ${lib.optional (!withFirewall) ''
-          $router->succeed("systemctl start nat.service");
-        ''}
         $client->fail("curl --fail --connect-timeout 5 http://server/ >&2");
         $client->fail("ping -c 1 server >&2");
 
         # And make sure that reloading the NAT job works.
         $router->succeed("${routerClosure}/bin/switch-to-configuration test 2>&1");
+        # FIXME: this should not be necessary, but nat.service is not started because
+        #        network.target is not triggered
+        #        (https://github.com/NixOS/nixpkgs/issues/16230#issuecomment-226408359)
+        ${lib.optionalString (!withFirewall) ''
+          $router->succeed("systemctl start nat.service");
+        ''}
         $client->succeed("curl --fail http://server/ >&2");
         $client->succeed("ping -c 1 server >&2");
       '';