From 06edd48842c9ca2488f66e35dee0f45141b1cda5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 15 Apr 2014 14:35:34 +0200 Subject: [PATCH] Fix the bittorrent test This was broken since e8baaba044689b75ef4f36ebc5a93b7462c23cb2, because on the tracker, a DNS lookup for "tracker" returns ::1 due to nss_myhostname. This apparently confused it. --- nixos/tests/bittorrent.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index 2604d1ffc925..b58657a5ecdb 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -42,8 +42,9 @@ in { environment.systemPackages = [ pkgs.miniupnpd ]; virtualisation.vlans = [ 1 2 ]; networking.nat.enable = true; - networking.nat.internalIPs = [ "192.168.2.0/24" ]; + networking.nat.internalInterfaces = [ "eth2" ]; networking.nat.externalInterface = "eth1"; + networking.firewall.enable = false; }; client1 = @@ -79,7 +80,7 @@ in # Create the torrent. $tracker->succeed("mkdir /tmp/data"); $tracker->succeed("cp ${file} /tmp/data/test.tar.bz2"); - $tracker->succeed("transmission-create /tmp/data/test.tar.bz2 -t http://tracker:6969/announce -o /tmp/test.torrent"); + $tracker->succeed("transmission-create /tmp/data/test.tar.bz2 -t http://${nodes.tracker.config.networking.interfaces.eth1.ipAddress}:6969/announce -o /tmp/test.torrent"); $tracker->succeed("chmod 644 /tmp/test.torrent"); # Start the tracker. !!! use a less crappy tracker