improve testing

This commit is contained in:
Jaka Hudoklin 2019-05-05 11:55:19 +02:00
parent e4493addd8
commit 7e7eb19e94
No known key found for this signature in database
GPG key ID: 916062A1C4748647
6 changed files with 55 additions and 35 deletions

View file

@ -2,7 +2,7 @@
, lib ? pkgs.lib
, kubenix ? import ../. { inherit pkgs lib; }
, k8sVersion ? "1.13"
, nixosPath ? <nixpkgs/nixos>
, nixosPath ? toString <nixpkgs/nixos>
# whether any testing error should throw an error
, throwError ? true
@ -18,6 +18,7 @@ let
kubenix.modules.testing
{
testing.name = "k8s-${k8sVersion}";
testing.throwError = throwError;
testing.e2e = e2e;
testing.tests = [
@ -47,4 +48,4 @@ let
inherit kubenix nixosPath;
};
}).config;
in test.testing
in pkgs.recurseIntoAttrs test.testing

View file

@ -30,7 +30,7 @@ with lib;
tag = "latest";
contents = [pkgs.nginx];
extraCommands = ''
mkdir etc
mkdir -p etc
chmod u+w etc
echo "nginx:x:1000:1000::/:" > etc/passwd
echo "nginx:x:1000:nginx" > etc/group