From b8e5799a635291007d2fdbed704e84a76294223d Mon Sep 17 00:00:00 2001 From: Mogeko Date: Sat, 11 May 2024 06:50:27 +0200 Subject: nixos/tests/rke2: add tests for single-node and multi-node For multi-node test, create a 3-node cluster (2 server nodes and 1 agent node) to test the connection between nodes. Setup `passthru.tests`. --- pkgs/applications/networking/cluster/rke2/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkgs/applications/networking/cluster/rke2/default.nix') diff --git a/pkgs/applications/networking/cluster/rke2/default.nix b/pkgs/applications/networking/cluster/rke2/default.nix index a2ddd220dc939..2ac749148f0f0 100644 --- a/pkgs/applications/networking/cluster/rke2/default.nix +++ b/pkgs/applications/networking/cluster/rke2/default.nix @@ -58,6 +58,15 @@ buildGoModule rec { passthru.updateScript = nix-update-script { }; + passthru.tests = { + version = testers.testVersion { + package = rke2; + version = "v${version}"; + }; + } // lib.optionalAttrs stdenv.isLinux { + inherit (nixosTests) rke2; + }; + meta = with lib; { homepage = "https://github.com/rancher/rke2"; description = "RKE2, also known as RKE Government, is Rancher's next-generation Kubernetes distribution."; -- cgit 1.4.1