git.iko.soy/typeable/nixpkgs
on master help sign in
nixos.tests.nat: fix
commitb18b70c74d5a2eadde6985ee9b2fac3411374eb5 authorRobin Gloster <mail@glob.in> dateFri 4 Aug 2017, 17:52 (9 years ago) parent1da0264
1 file changed+6−6
nixos/tests/nat.nix+6−6
nixos/tests/nat.nix+6−6
@@ -102,17 +102,17 @@ import ./make-test.nix ({ pkgs, lib, withFirewall, withConntrackHelpers ? false,
102102
103103 # If we turn off NAT, the client shouldn't be able to reach the server.
104104 $router->succeed("${routerDummyNoNatClosure}/bin/switch-to-configuration test 2>&1");
105− # FIXME: this should not be necessary, but nat.service is not started because
106− # network.target is not triggered
107− # (https://github.com/NixOS/nixpkgs/issues/16230#issuecomment-226408359)
108− ${lib.optional (!withFirewall) ''
109− $router->succeed("systemctl start nat.service");
110− ''}
111105 $client->fail("curl --fail --connect-timeout 5 http://server/ >&2");
112106 $client->fail("ping -c 1 server >&2");
113107
114108 # And make sure that reloading the NAT job works.
115109 $router->succeed("${routerClosure}/bin/switch-to-configuration test 2>&1");
110+ # FIXME: this should not be necessary, but nat.service is not started because
111+ # network.target is not triggered
112+ # (https://github.com/NixOS/nixpkgs/issues/16230#issuecomment-226408359)
113+ ${lib.optionalString (!withFirewall) ''
114+ $router->succeed("systemctl start nat.service");
115+ ''}
116116 $client->succeed("curl --fail http://server/ >&2");
117117 $client->succeed("ping -c 1 server >&2");
118118 '';