diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2024-05-07 11:02:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 11:02:03 -0300 |
commit | dd7c32ab3e2ffd6625ab149e9637bffaecd7df42 (patch) | |
tree | fe7725761835a2fe25552f1c360871ad9f47e0ef /nixos/tests | |
parent | 31be9134a28b5efb4a3a5258db21e758ba46bb4d (diff) | |
parent | 2b0b15ec94d24a1991ead8312802b8f8884235c6 (diff) |
Merge pull request #309099 from rorosen/package-k3s-kilall
k3s: package k3s-killall script
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/k3s/single-node.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/tests/k3s/single-node.nix b/nixos/tests/k3s/single-node.nix index fd64a050e61ef..b7ac5d9eeeac7 100644 --- a/nixos/tests/k3s/single-node.nix +++ b/nixos/tests/k3s/single-node.nix @@ -78,6 +78,18 @@ import ../make-test-python.nix ({ pkgs, lib, k3s, ... }: # regression test for #176445 machine.fail("journalctl -o cat -u k3s.service | grep 'ipset utility not found'") + with subtest("Run k3s-killall"): + # Call the killall script with a clean path to assert that + # all required commands are wrapped + output = machine.succeed("PATH= ${k3s}/bin/k3s-killall.sh 2>&1 | tee /dev/stderr") + assert "command not found" not in output, "killall script contains unknown command" + + # Check that killall cleaned up properly + machine.fail("systemctl is-active k3s.service") + machine.fail("systemctl list-units | grep containerd") + machine.fail("ip link show | awk -F': ' '{print $2}' | grep -e flannel -e cni0") + machine.fail("ip netns show | grep cni-") + machine.shutdown() ''; }) |