fixup tests

This commit is contained in:
David Arnold 2021-05-28 20:26:17 -05:00 committed by "David Arnold"
parent bf231d19fa
commit 39badb2084
No known key found for this signature in database
GPG key ID: 6D6A936E69C59D08
34 changed files with 88 additions and 110 deletions

View file

@ -0,0 +1,46 @@
{ config, lib, pkgs, ... }:
with lib;
with import ../../lib/docker { inherit lib pkgs; };
let
testing = config.testing;
allImages = unique (flatten (map (t: t.evaled.config.docker.export or [ ]) testing.tests));
cfg = config.testing.docker;
in
{
options.testing.docker = {
registryUrl = mkOption {
description = "Docker registry url";
type = types.str;
};
images = mkOption {
description = "List of images to export";
type = types.listOf types.package;
};
copyScript = mkOption {
description = "Script to copy images to registry";
type = types.package;
};
};
config.testing.docker = {
images = allImages;
copyScript = copyDockerImages {
images = cfg.images;
dest = "docker://" + cfg.registryUrl;
};
};
config.testing.defaults = [{
features = [ "docker" ];
default = {
docker.registry.url = cfg.registryUrl;
};
}];
}