summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2014-09-02 12:31:03 +0200
committerPeter Simons <simons@cryp.to>2014-09-02 12:31:03 +0200
commit1c0d15b90ef67363f798d67d12dd31ed5fccb411 (patch)
tree3693dd49b591dbbba261e95fc4b78650f1675578 /nixos/tests
parentbb61b45d92bad2435e80dcac855a78bda57ec7e8 (diff)
parent2fc76ea05417671306d27f9ba83ef1b8d4049f3d (diff)
downloadnixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.tar
nixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.tar.gz
nixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.tar.bz2
nixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.tar.lz
nixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.tar.xz
nixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.tar.zst
nixpkgs-1c0d15b90ef67363f798d67d12dd31ed5fccb411.zip
Merge branch 'origin/master' into staging.
Conflicts:
	pkgs/development/libraries/ffmpeg/2.x.nix
	pkgs/development/libraries/serf/default.nix
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/bittorrent.nix6
-rw-r--r--nixos/tests/installer.nix21
-rw-r--r--nixos/tests/nat.nix2
3 files changed, 14 insertions, 15 deletions
diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix
index 002e012f65f..b12a861f723 100644
--- a/nixos/tests/bittorrent.nix
+++ b/nixos/tests/bittorrent.nix
@@ -16,7 +16,7 @@ let
   miniupnpdConf = nodes: pkgs.writeText "miniupnpd.conf"
     ''
       ext_ifname=eth1
-      listening_ip=${nodes.router.config.networking.interfaces.eth2.ipAddress}/24
+      listening_ip=${(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address}/24
       allow 1024-65535 192.168.2.0/24 1024-65535
     '';
 
@@ -53,7 +53,7 @@ in
         { environment.systemPackages = [ pkgs.transmission ];
           virtualisation.vlans = [ 2 ];
           networking.defaultGateway =
-            nodes.router.config.networking.interfaces.eth2.ipAddress;
+            (pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
           networking.firewall.enable = false;
         };
 
@@ -81,7 +81,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://${nodes.tracker.config.networking.interfaces.eth1.ipAddress}:6969/announce -o /tmp/test.torrent");
+      $tracker->succeed("transmission-create /tmp/data/test.tar.bz2 -t http://${(pkgs.lib.head nodes.tracker.config.networking.interfaces.eth1.ip4).address}:6969/announce -o /tmp/test.torrent");
       $tracker->succeed("chmod 644 /tmp/test.torrent");
 
       # Start the tracker.  !!! use a less crappy tracker
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index ef11fcb1001..6ee52fd63d8 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -35,8 +35,8 @@ let
 
 
   # The configuration to install.
-  makeConfig = { testChannel, useEFI, grubVersion, grubDevice, grubIdentifier }:
-    pkgs.writeText "configuration.nix" ''
+  makeConfig = { testChannel, useEFI, grubVersion, grubDevice }: pkgs.writeText "configuration.nix"
+    ''
       { config, pkgs, modulesPath, ... }:
 
       { imports =
@@ -54,7 +54,6 @@ let
           ''}
           boot.loader.grub.device = "${grubDevice}";
           boot.loader.grub.extraConfig = "serial; terminal_output.serial";
-          boot.loader.grub.fsIdentifier = "${grubIdentifier}";
         ''}
 
         environment.systemPackages = [ ${optionalString testChannel "pkgs.rlwrap"} ];
@@ -94,7 +93,7 @@ let
   # disk, and then reboot from the hard disk.  It's parameterized with
   # a test script fragment `createPartitions', which must create
   # partitions and filesystems.
-  testScriptFun = { createPartitions, testChannel, useEFI, grubVersion, grubDevice, grubIdentifier }:
+  testScriptFun = { createPartitions, testChannel, useEFI, grubVersion, grubDevice }:
     let
       # FIXME: OVMF doesn't boot from virtio http://www.mail-archive.com/edk2-devel@lists.sourceforge.net/msg01501.html
       iface = if useEFI || grubVersion == 1 then "scsi" else "virtio";
@@ -162,7 +161,7 @@ let
       $machine->succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2");
 
       $machine->copyFileFromHost(
-          "${ makeConfig { inherit testChannel useEFI grubVersion grubDevice grubIdentifier; } }",
+          "${ makeConfig { inherit testChannel useEFI grubVersion grubDevice; } }",
           "/mnt/etc/nixos/configuration.nix");
 
       # Perform the installation.
@@ -217,13 +216,13 @@ let
 
 
   makeInstallerTest = name:
-    { createPartitions, testChannel ? false, useEFI ? false, grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid" }:
+    { createPartitions, testChannel ? false, useEFI ? false, grubVersion ? 2, grubDevice ? "/dev/vda" }:
     makeTest {
       inherit iso;
       name = "installer-" + name;
       nodes = if testChannel then { inherit webserver; } else { };
       testScript = testScriptFun {
-        inherit createPartitions testChannel useEFI grubVersion grubDevice grubIdentifier;
+        inherit createPartitions testChannel useEFI grubVersion grubDevice;
       };
     };
 
@@ -397,7 +396,7 @@ in {
     };
 
   # Test using labels to identify volumes in grub
-  simpleLabels = makeInstallerTest {
+  simpleLabels = makeInstallerTest "simpleLabels" {
     createPartitions = ''
       $machine->succeed(
         "sgdisk -Z /dev/vda",
@@ -413,7 +412,7 @@ in {
 
   # Test using the provided disk name within grub
   # TODO: Fix udev so the symlinks are unneeded in /dev/disks
-  simpleProvided = makeInstallerTest {
+  simpleProvided = makeInstallerTest "simpleProvided" {
     createPartitions = ''
       my $UUID = "\$(blkid -s UUID -o value /dev/vda2)";
       $machine->succeed(
@@ -436,7 +435,7 @@ in {
   };
 
   # Simple btrfs grub testing
-  btrfsSimple = makeInstallerTest {
+  btrfsSimple = makeInstallerTest "btrfsSimple" {
     createPartitions = ''
       $machine->succeed(
         "sgdisk -Z /dev/vda",
@@ -450,7 +449,7 @@ in {
   };
 
   # Test to see if we can detect /boot and /nix on subvolumes
-  btrfsSubvols = makeInstallerTest {
+  btrfsSubvols = makeInstallerTest "btrfsSubvols" {
     createPartitions = ''
       $machine->succeed(
         "sgdisk -Z /dev/vda",
diff --git a/nixos/tests/nat.nix b/nixos/tests/nat.nix
index 5fdcc0e97ca..87ed974edad 100644
--- a/nixos/tests/nat.nix
+++ b/nixos/tests/nat.nix
@@ -13,7 +13,7 @@ import ./make-test.nix {
         { virtualisation.vlans = [ 1 ];
           networking.firewall.allowPing = true;
           networking.defaultGateway =
-            nodes.router.config.networking.interfaces.eth2.ipAddress;
+            (pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
         };
 
       router =