2021-04-03 22:37:13 -07:00
|
|
|
let
|
|
|
|
|
fetch = import ./lib/compat.nix;
|
|
|
|
|
in
|
|
|
|
|
{ pkgs ? import (fetch "nixpkgs") { }
|
|
|
|
|
, lib ? pkgs.lib
|
|
|
|
|
, throwError ? true
|
|
|
|
|
}:
|
2019-03-08 00:39:09 +01:00
|
|
|
|
|
|
|
|
with lib;
|
2019-02-10 21:03:47 +01:00
|
|
|
let
|
2019-02-12 16:22:18 +01:00
|
|
|
kubenix = import ./. { inherit pkgs; };
|
|
|
|
|
|
|
|
|
|
lib = kubenix.lib;
|
|
|
|
|
|
2019-05-05 12:13:09 +02:00
|
|
|
runK8STests = k8sVersion: import ./tests {
|
2021-05-06 16:07:24 -04:00
|
|
|
inherit pkgs lib kubenix k8sVersion throwError nixosPath;
|
2019-05-05 12:13:09 +02:00
|
|
|
};
|
2021-04-03 22:37:13 -07:00
|
|
|
in
|
|
|
|
|
rec {
|
2019-02-10 21:03:47 +01:00
|
|
|
|
2019-05-05 12:13:09 +02:00
|
|
|
tests = {
|
2021-04-28 21:15:58 -05:00
|
|
|
k8s-1_19 = runK8STests "1.19";
|
|
|
|
|
k8s-1_20 = runK8STests "1.20";
|
|
|
|
|
k8s-1_21 = runK8STests "1.21";
|
2019-02-12 16:22:18 +01:00
|
|
|
};
|
2019-03-07 18:03:51 +01:00
|
|
|
|
2019-03-12 20:33:56 +01:00
|
|
|
test-check =
|
2019-05-05 12:13:09 +02:00
|
|
|
if !(all (test: test.success) (attrValues tests))
|
2019-03-08 00:39:09 +01:00
|
|
|
then throw "tests failed"
|
|
|
|
|
else true;
|
|
|
|
|
|
2021-04-03 22:37:13 -07:00
|
|
|
examples = import ./examples { };
|
2019-02-10 21:03:47 +01:00
|
|
|
}
|