feat: initial testing support

This commit is contained in:
Jaka Hudoklin 2019-02-12 16:22:18 +01:00
parent e286c9b0e8
commit 9f8ca8447e
No known key found for this signature in database
GPG key ID: 6A08896BFD32BD95
6 changed files with 362 additions and 127 deletions

28
test/default.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs ? import <nixpkgs> {}
, kubenix ? import ../. {inherit pkgs;}
, lib ? kubenix.lib
# whether any testing error should throw an error
, throwError ? true }:
with lib;
(evalModules {
modules = [
./modules/testing.nix
{
testing.throwError = throwError;
testing.tests = [
./k8s/simple.nix
./k8s/deployment.nix
];
}
];
args = {
inherit pkgs;
};
specialArgs = {
inherit kubenix;
};
}).config.testing.result