From d5b1e25711c3451de8f6df7cb4c9148d7aed64c6 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Thu, 21 Jul 2022 23:13:20 -0700 Subject: [PATCH] nixos/tests/k3s: reorganize test into a subdirectory In preperation for more tests, coming soon. --- nixos/tests/all-tests.nix | 2 +- nixos/tests/k3s/default.nix | 7 +++++++ nixos/tests/{k3s-single-node.nix => k3s/single-node.nix} | 3 +-- pkgs/applications/networking/cluster/k3s/default.nix | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 nixos/tests/k3s/default.nix rename nixos/tests/{k3s-single-node.nix => k3s/single-node.nix} (98%) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 03a7f17c07cc..56a3eec7d643 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -254,7 +254,7 @@ in { jibri = handleTest ./jibri.nix {}; jirafeau = handleTest ./jirafeau.nix {}; jitsi-meet = handleTest ./jitsi-meet.nix {}; - k3s-single-node = handleTest ./k3s-single-node.nix {}; + k3s = handleTest ./k3s {}; kafka = handleTest ./kafka.nix {}; kanidm = handleTest ./kanidm.nix {}; kbd-setfont-decompress = handleTest ./kbd-setfont-decompress.nix {}; diff --git a/nixos/tests/k3s/default.nix b/nixos/tests/k3s/default.nix new file mode 100644 index 000000000000..e758ca162fa1 --- /dev/null +++ b/nixos/tests/k3s/default.nix @@ -0,0 +1,7 @@ +{ system ? builtins.currentSystem +, pkgs ? import ../../.. { inherit system; } +}: +{ + # Run a single node k3s cluster and verify a pod can run + single-node = import ./single-node.nix { inherit system pkgs; }; +} diff --git a/nixos/tests/k3s-single-node.nix b/nixos/tests/k3s/single-node.nix similarity index 98% rename from nixos/tests/k3s-single-node.nix rename to nixos/tests/k3s/single-node.nix index fb6510ee087b..0f9fa8dea5af 100644 --- a/nixos/tests/k3s-single-node.nix +++ b/nixos/tests/k3s/single-node.nix @@ -1,5 +1,4 @@ -import ./make-test-python.nix ({ pkgs, ... }: - +import ../make-test-python.nix ({ pkgs, ... }: let imageEnv = pkgs.buildEnv { name = "k3s-pause-image-env"; diff --git a/pkgs/applications/networking/cluster/k3s/default.nix b/pkgs/applications/networking/cluster/k3s/default.nix index 3f216213849d..614ddc58dac5 100644 --- a/pkgs/applications/networking/cluster/k3s/default.nix +++ b/pkgs/applications/networking/cluster/k3s/default.nix @@ -323,7 +323,7 @@ buildGoModule rec { passthru.updateScript = ./update.sh; - passthru.tests = { inherit (nixosTests) k3s-single-node; }; + passthru.tests = nixosTests.k3s; meta = baseMeta; }