From 9d477c37ac1e05195d192a4b746f9c3764816930 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Fri, 28 Oct 2022 20:43:16 -0700 Subject: [PATCH] nixos/tests/k3s: fix multi-node test This corrects the multi-node test after a couple recent changes which resulted in it being broken. The `lib.toString` change was an incorrect tree-wide refactor, and the aarch64 change also introduced an error in python indentation/formatting I believe. --- nixos/tests/k3s/multi-node.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/tests/k3s/multi-node.nix b/nixos/tests/k3s/multi-node.nix index 2a3aa22b96bf..9a6c7fd46573 100644 --- a/nixos/tests/k3s/multi-node.nix +++ b/nixos/tests/k3s/multi-node.nix @@ -112,7 +112,7 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: enable = true; role = "agent"; serverAddr = "https://192.168.1.3:6443"; - extraFlags = lib.toString [ + extraFlags = lib.concatStringsSep " " [ "--pause-image" "test.local/pause:local" "--node-ip" "192.168.1.2" ]; @@ -138,12 +138,15 @@ import ../make-test-python.nix ({ pkgs, lib, ... }: m.start() m.wait_for_unit("k3s") + is_aarch64 = "${toString pkgs.stdenv.isAarch64}" == "1" + # wait for the agent to show up server.wait_until_succeeds("k3s kubectl get node agent") for m in machines: - '' # Fix-Me: Tests fail for 'aarch64-linux' as: "CONFIG_CGROUP_FREEZER: missing (fail)" - + lib.optionalString (!pkgs.stdenv.isAarch64) ''m.succeed("k3s check-config")'' + '' + # Fix-Me: Tests fail for 'aarch64-linux' as: "CONFIG_CGROUP_FREEZER: missing (fail)" + if not is_aarch64: + m.succeed("k3s check-config") m.succeed( "${pauseImage} | k3s ctr image import -" )