k3s: add passthru.tests to all derivations

This commit is contained in:
Jairo Llopis
2023-02-13 08:33:20 +00:00
parent 52a153aae2
commit f0a6595fe5
4 changed files with 11 additions and 7 deletions
@@ -324,8 +324,7 @@ buildGoModule rec {
# Fix-Me: Needs to be adapted specifically for 1.23
# passthru.updateScript = ./update.sh;
# Fix-Me: Needs to be adapted specifically for 1.23
# passthru.tests = { inherit (nixosTests) k3s-single-node k3s-single-node-docker; };
passthru.tests = k3s.passthru.mkTests k3sVersion;
meta = baseMeta;
}
@@ -322,8 +322,7 @@ buildGoModule rec {
# Fix-Me: Needs to be adapted specifically for 1.24
# passthru.updateScript = ./update.sh;
# Fix-Me: Needs to be adapted specifically for 1.24
# passthru.tests = nixosTests.k3s;
passthru.tests = k3s.passthru.mkTests k3sVersion;
meta = baseMeta;
}
@@ -322,8 +322,7 @@ buildGoModule rec {
# Fix-Me: Needs to be adapted specifically for 1.25
# passthru.updateScript = ./update.sh;
# Fix-Me: Needs to be adapted specifically for 1.25
# passthru.tests = nixosTests.k3s;
passthru.tests = k3s.passthru.mkTests k3sVersion;
meta = baseMeta;
}
@@ -319,7 +319,14 @@ buildGoModule rec {
passthru.updateScript = ./update.sh;
passthru.tests = nixosTests.k3s;
passthru.mkTests = version:
let k3s_version = "k3s_" + lib.replaceStrings ["."] ["_"] (lib.versions.majorMinor version);
in {
single-node = nixosTests.k3s.single-node.${k3s_version};
multi-node = nixosTests.k3s.multi-node.${k3s_version};
};
passthru.tests = passthru.mkTests k3sVersion;
meta = baseMeta;
}