test: add container support

This commit is contained in:
Erik Arvstedt 2020-09-27 12:43:28 +02:00
parent e99b7edb8e
commit fcc67da9f4
No known key found for this signature in database
GPG key ID: 33312B944DD97846
5 changed files with 129 additions and 1 deletions

View file

@ -5,7 +5,7 @@ with lib;
test = {
noConnections = mkOption {
type = types.bool;
default = true;
default = !config.test.container.enableWAN;
description = ''
Whether services should be configured to not connect to external hosts.
This can silence some warnings while running the test in an offline environment.
@ -19,6 +19,15 @@ with lib;
dictionary variable 'test_data'. The data is exported via JSON.
'';
};
container = {
# Forwarded to extra-container. For descriptions, see
# https://github.com/erikarvstedt/extra-container/blob/master/eval-config.nix
addressPrefix = mkOption { default = "10.225.255"; };
enableWAN = mkOption { default = false; };
firewallAllowHost = mkOption { default = true; };
exposeLocalhost = mkOption { default = false; };
};
};
tests = mkOption {