mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
style: simplify example & tests top level invokation
This commit is contained in:
parent
0c99276b50
commit
557cc48a0a
2 changed files with 31 additions and 20 deletions
|
|
@ -3,20 +3,32 @@
|
||||||
let
|
let
|
||||||
# evaluated configuration
|
# evaluated configuration
|
||||||
config = (evalModules {
|
config = (evalModules {
|
||||||
modules = [
|
module =
|
||||||
|
{ kubenix, ... }: {
|
||||||
|
imports = [
|
||||||
|
kubenix.modules.testing
|
||||||
|
./module.nix
|
||||||
|
];
|
||||||
|
|
||||||
({ kubenix, ... }: { imports = [ kubenix.modules.testing ]; })
|
# commonalities
|
||||||
|
kubenix.project = "nginx-deployment-example";
|
||||||
|
docker.registry.url = registry;
|
||||||
|
kubernetes.version = "1.21";
|
||||||
|
|
||||||
./module.nix
|
testing = {
|
||||||
|
tests = [ ./test.nix ];
|
||||||
{ docker.registry.url = registry; }
|
docker.registryUrl = "";
|
||||||
|
# testing commonalities for tests that exhibit the respective feature
|
||||||
{
|
defaults = [
|
||||||
testing.tests = [ ./test.nix ];
|
{
|
||||||
testing.docker.registryUrl = "";
|
features = [ "k8s" ];
|
||||||
}
|
default = {
|
||||||
|
kubernetes.version = "1.20";
|
||||||
];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}).config;
|
}).config;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
let
|
let
|
||||||
config = (evalModules {
|
config = (evalModules {
|
||||||
|
|
||||||
modules = [
|
module =
|
||||||
|
{ kubenix, pkgs, ... }: {
|
||||||
|
|
||||||
({ kubenix, ... }: { imports = [ kubenix.modules.testing ]; })
|
imports = [ kubenix.modules.testing ];
|
||||||
|
|
||||||
({ pkgs, ... }: {
|
|
||||||
testing = {
|
testing = {
|
||||||
name = "kubenix-${k8sVersion}";
|
name = "kubenix-${k8sVersion}";
|
||||||
throwError = throwError;
|
throwError = throwError;
|
||||||
|
|
@ -36,10 +36,10 @@ let
|
||||||
./submodules/exports.nix
|
./submodules/exports.nix
|
||||||
./submodules/passthru.nix
|
./submodules/passthru.nix
|
||||||
];
|
];
|
||||||
args = {
|
|
||||||
images = pkgs.callPackage ./images.nix { };
|
args = { images = pkgs.callPackage ./images.nix { }; };
|
||||||
};
|
|
||||||
docker.registryUrl = registry;
|
docker.registryUrl = registry;
|
||||||
|
|
||||||
defaults = [
|
defaults = [
|
||||||
{
|
{
|
||||||
features = [ "k8s" ];
|
features = [ "k8s" ];
|
||||||
|
|
@ -49,9 +49,8 @@ let
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
})
|
|
||||||
|
|
||||||
];
|
};
|
||||||
|
|
||||||
}).config;
|
}).config;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue