feat: refactor tests

This commit is contained in:
Jaka Hudoklin 2019-02-17 19:42:01 +01:00
parent 0d68a401f0
commit b4c4f17cc9
No known key found for this signature in database
GPG key ID: 916062A1C4748647
10 changed files with 3 additions and 2 deletions

View file

@ -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 = {};
}