This commit is contained in:
GTrunSec 2022-04-02 12:40:35 -07:00
parent a0ce293db8
commit 60592d3096
No known key found for this signature in database
GPG key ID: 2368FAFA4ABDD2A0
55 changed files with 23668 additions and 30925 deletions

View file

@ -1,20 +1,25 @@
{ config, lib, kubenix, pkgs, ... }:
with lib;
let
latestCrontab = config.kubernetes.api.resources.cronTabs.latest;
in
{
imports = with kubenix.modules; [ test k8s ];
config,
lib,
kubenix,
pkgs,
...
}:
with lib; let
latestCrontab = config.kubernetes.api.resources.cronTabs.latest;
in {
imports = with kubenix.modules; [test k8s];
test = {
name = "k8s-crd";
description = "Simple test tesing CRD";
enable = builtins.compareVersions config.kubernetes.version "1.8" >= 0;
assertions = [{
message = "Custom resource should have correct version set";
assertion = latestCrontab.apiVersion == "stable.example.com/v2";
}];
assertions = [
{
message = "Custom resource should have correct version set";
assertion = latestCrontab.apiVersion == "stable.example.com/v2";
}
];
script = ''
@pytest.mark.applymanifest('${config.kubernetes.resultYAML}')
def test_testing_module(kube):
@ -50,7 +55,6 @@ in
type = types.str;
};
};
}
{
group = "stable.example.com";