mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat: refactor tests
This commit is contained in:
parent
0d68a401f0
commit
b4c4f17cc9
10 changed files with 3 additions and 2 deletions
|
|
@ -1,23 +0,0 @@
|
|||
{ config, test, kubenix, ... }:
|
||||
|
||||
let
|
||||
cfg = config.kubernetes.api.pods.nginx;
|
||||
in {
|
||||
imports = [
|
||||
kubenix.k8s
|
||||
];
|
||||
|
||||
test = {
|
||||
name = "k8s/simple";
|
||||
description = "Simple k8s testing wheter name, apiVersion and kind are preset";
|
||||
assertions = [{
|
||||
message = "should have apiVersion and kind set";
|
||||
assertion = cfg.apiVersion == "v1" && cfg.kind == "Pod";
|
||||
} {
|
||||
message = "should have name set";
|
||||
assertion = cfg.metadata.name == "nginx";
|
||||
}];
|
||||
};
|
||||
|
||||
kubernetes.api.pods.nginx = {};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue