Merge pull request #198390 from euank/k3s-tests-fixup

nixos/tests/k3s: fix multi-node test
This commit is contained in:
maxine 2022-10-30 14:40:21 +01:00 committed by GitHub
commit 700de524b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,7 +112,7 @@ import ../make-test-python.nix ({ pkgs, lib, ... }:
enable = true; enable = true;
role = "agent"; role = "agent";
serverAddr = "https://192.168.1.3:6443"; serverAddr = "https://192.168.1.3:6443";
extraFlags = lib.toString [ extraFlags = lib.concatStringsSep " " [
"--pause-image" "test.local/pause:local" "--pause-image" "test.local/pause:local"
"--node-ip" "192.168.1.2" "--node-ip" "192.168.1.2"
]; ];
@ -138,12 +138,15 @@ import ../make-test-python.nix ({ pkgs, lib, ... }:
m.start() m.start()
m.wait_for_unit("k3s") m.wait_for_unit("k3s")
is_aarch64 = "${toString pkgs.stdenv.isAarch64}" == "1"
# wait for the agent to show up # wait for the agent to show up
server.wait_until_succeeds("k3s kubectl get node agent") server.wait_until_succeeds("k3s kubectl get node agent")
for m in machines: for m in machines:
'' # Fix-Me: Tests fail for 'aarch64-linux' as: "CONFIG_CGROUP_FREEZER: missing (fail)" # Fix-Me: Tests fail for 'aarch64-linux' as: "CONFIG_CGROUP_FREEZER: missing (fail)"
+ lib.optionalString (!pkgs.stdenv.isAarch64) ''m.succeed("k3s check-config")'' + '' if not is_aarch64:
m.succeed("k3s check-config")
m.succeed( m.succeed(
"${pauseImage} | k3s ctr image import -" "${pauseImage} | k3s ctr image import -"
) )