summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-16 13:24:49 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-16 13:30:34 +0200
commit639bb95d0a4f99cc15375ec437a3c0013aaf6194 (patch)
tree509edb9e5b67e8826183965aa3252fb4e949d0f2
parentfbb40e0389276556f7282abb6c7452281f7698b2 (diff)
downloadnixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.tar
nixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.tar.gz
nixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.tar.bz2
nixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.tar.lz
nixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.tar.xz
nixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.tar.zst
nixlib-639bb95d0a4f99cc15375ec437a3c0013aaf6194.zip
Test whether the transparent fetchurl cache (tarballs.nixos.org) works
Testing this is useful in any case, but it's necessary now because Nix
1.6 doesn't check the binary cache for fetchurl output anymore.

http://hydra.nixos.org/build/6144188
-rw-r--r--tests/installer.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/installer.nix b/tests/installer.nix
index 74d1650b2ab1..0ce780531712 100644
--- a/tests/installer.nix
+++ b/tests/installer.nix
@@ -81,11 +81,11 @@ let
         };
 
       virtualisation.writableStore = true;
-      virtualisation.pathsInNixDB = channelContents;
+      virtualisation.pathsInNixDB = channelContents ++ [ pkgs.hello.src ];
       virtualisation.memorySize = 768;
     };
 
-  channelContents = [ pkgs.hello.src pkgs.rlwrap ];
+  channelContents = [ pkgs.rlwrap ];
 
 
   # The test script boots the CD, installs NixOS on an empty hard
@@ -112,6 +112,8 @@ let
         $webserver->succeed(
             "nix-push --bzip2 --dest /tmp/channel --manifest --url-prefix http://nixos.org/channels/nixos-unstable " .
             "${toString channelContents} >&2");
+        $webserver->succeed("mkdir /tmp/channel/sha256");
+        $webserver->succeed("cp ${pkgs.hello.src} /tmp/channel/sha256/${pkgs.hello.src.outputHash}");
       ''}
 
       # Make sure that we get a login prompt etc.
@@ -125,7 +127,7 @@ let
         # Allow the machine to talk to the fake nixos.org.
         $machine->succeed(
             "rm /etc/hosts",
-            "echo 192.168.1.1 nixos.org cache.nixos.org > /etc/hosts",
+            "echo 192.168.1.1 nixos.org cache.nixos.org tarballs.nixos.org > /etc/hosts",
             "ifconfig eth1 up 192.168.1.2",
         );