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
40
tests/k8s/1.13/crd.nix
Normal file
40
tests/k8s/1.13/crd.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, kubenix, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.kubernetes.api.customresourcedefinitions.crontabs;
|
||||
in {
|
||||
imports = [
|
||||
kubenix.k8s
|
||||
];
|
||||
|
||||
test = {
|
||||
name = "k8s/1.13/crd";
|
||||
description = "Simple test tesing CRD for k8s 1.13";
|
||||
enable = builtins.compareVersions config.kubernetes.version "1.13" >= 0;
|
||||
assertions = [{
|
||||
message = "should have versions set";
|
||||
assertion = (head cfg.spec.versions).name == "v1";
|
||||
}];
|
||||
};
|
||||
|
||||
kubernetes.api.customresourcedefinitions.crontabs = {
|
||||
metadata.name = "crontabs.stable.example.com";
|
||||
spec = {
|
||||
group = "stable.example.com";
|
||||
versions = [{
|
||||
name = "v1";
|
||||
served = true;
|
||||
storage = true;
|
||||
}];
|
||||
scope = "Namespaced";
|
||||
names = {
|
||||
plural = "crontabs";
|
||||
singular = "crontab";
|
||||
kind = "CronTab";
|
||||
shortNames = ["ct"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue