nixpkgs/nixos/tests/k3s/default.nix
Jairo Llopis 52a153aae2
k3s: test all versions
Since https://github.com/NixOS/nixpkgs/issues/213943 got fixed, only the main k3s derivation is tested.

Here I changed the tests a bit to make them test all provided k3s derivations

@moduon MT-1718
2023-02-10 09:12:14 +00:00

22 lines
562 B
Nix

{ system ? builtins.currentSystem
, pkgs ? import ../../.. { inherit system; }
, lib ? pkgs.lib
}:
let
allK3s = {
inherit (pkgs)
k3s
k3s_1_23
k3s_1_24
k3s_1_25
k3s_1_26
;
};
in
{
# Run a single node k3s cluster and verify a pod can run
single-node = lib.mapAttrs (_: k3s: import ./single-node.nix { inherit system pkgs k3s; }) allK3s;
# Run a multi-node k3s cluster and verify pod networking works across nodes
multi-node = lib.mapAttrs (_: k3s: import ./multi-node.nix { inherit system pkgs k3s; }) allK3s;
}