1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

nixos/tests/containers-imperative: Fix test

Make sure that we always have everything available within the store of
the VM, so let's evaluate/build the test container fully on the host
system and propagate all dependencies to the VM.

This way, even if there are additional default dependencies that come
with containers in the future we should be on the safe side as these
dependencies should now be included for the test as well.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @kampfschlaefer, @edolstra
This commit is contained in:
aszlig 2016-05-04 19:53:43 +02:00
parent 6acf41f9bf
commit 9fa30d3bad
No known key found for this signature in database
GPG key ID: D0EBD0EC8C2DC961

View file

@ -7,11 +7,20 @@ import ./make-test.nix ({ pkgs, ...} : {
};
machine =
{ config, pkgs, ... }:
{ config, pkgs, system, lib, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true;
virtualisation.memorySize = 768;
virtualisation.pathsInNixDB = [ pkgs.stdenv ];
# Make sure we always have all the required dependencies for creating a
# container available within the VM, because we don't have network access.
virtualisation.pathsInNixDB = let
emptyContainer = import ../lib/eval-config.nix {
inherit (config.nixpkgs) system;
modules = lib.singleton {
containers.foo.config = {};
};
};
in [ pkgs.stdenv emptyContainer.config.containers.foo.path ];
};
testScript =