diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index c26b1097823b..cb659e879878 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -333,7 +333,14 @@ in cinnamon-wayland = runTest ./cinnamon-wayland.nix; cjdns = runTest ./cjdns.nix; clatd = runTest ./clatd.nix; - clickhouse = import ./clickhouse { inherit runTest; }; + clickhouse = import ./clickhouse { + inherit runTest; + package = pkgs.clickhouse; + }; + clickhouse-lts = import ./clickhouse { + inherit runTest; + package = pkgs.clickhouse-lts; + }; cloud-init = runTest ./cloud-init.nix; cloud-init-hostname = runTest ./cloud-init-hostname.nix; cloudlog = runTest ./cloudlog.nix; diff --git a/nixos/tests/clickhouse/base.nix b/nixos/tests/clickhouse/base.nix index cbeb5b64699a..c67857a82688 100644 --- a/nixos/tests/clickhouse/base.nix +++ b/nixos/tests/clickhouse/base.nix @@ -1,10 +1,13 @@ -{ pkgs, ... }: +{ pkgs, package, ... }: { name = "clickhouse"; meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; nodes.machine = { - services.clickhouse.enable = true; + services.clickhouse = { + enable = true; + inherit package; + }; virtualisation.memorySize = 4096; }; diff --git a/nixos/tests/clickhouse/default.nix b/nixos/tests/clickhouse/default.nix index e6568010eb66..88e01fcb1fdb 100644 --- a/nixos/tests/clickhouse/default.nix +++ b/nixos/tests/clickhouse/default.nix @@ -1,8 +1,31 @@ -{ runTest }: +{ + runTest, + package, +}: { - base = runTest ./base.nix; - kafka = runTest ./kafka.nix; - keeper = runTest ./keeper.nix; - s3 = runTest ./s3.nix; + base = runTest { + imports = [ ./base.nix ]; + _module.args = { + inherit package; + }; + }; + kafka = runTest { + imports = [ ./kafka.nix ]; + _module.args = { + inherit package; + }; + }; + keeper = runTest { + imports = [ ./keeper.nix ]; + _module.args = { + inherit package; + }; + }; + s3 = runTest { + imports = [ ./s3.nix ]; + _module.args = { + inherit package; + }; + }; } diff --git a/nixos/tests/clickhouse/kafka.nix b/nixos/tests/clickhouse/kafka.nix index 29e4f839d07f..94723fa5a968 100644 --- a/nixos/tests/clickhouse/kafka.nix +++ b/nixos/tests/clickhouse/kafka.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, package, ... }: let kafkaNamedCollectionConfig = '' @@ -38,7 +38,10 @@ in }; }; - services.clickhouse.enable = true; + services.clickhouse = { + enable = true; + inherit package; + }; virtualisation.memorySize = 4096; }; diff --git a/nixos/tests/clickhouse/keeper.nix b/nixos/tests/clickhouse/keeper.nix index 40be4c19f2cf..8b99d5844161 100644 --- a/nixos/tests/clickhouse/keeper.nix +++ b/nixos/tests/clickhouse/keeper.nix @@ -1,4 +1,9 @@ -{ lib, pkgs, ... }: +{ + lib, + pkgs, + package, + ... +}: rec { name = "clickhouse-keeper"; meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; @@ -94,7 +99,10 @@ rec { 9444 ]; - services.clickhouse.enable = true; + services.clickhouse = { + enable = true; + inherit package; + }; systemd.services.clickhouse = { after = [ "network-online.target" ]; diff --git a/nixos/tests/clickhouse/s3.nix b/nixos/tests/clickhouse/s3.nix index 2268b6128fe6..cfa8c46f0628 100644 --- a/nixos/tests/clickhouse/s3.nix +++ b/nixos/tests/clickhouse/s3.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, package, ... }: let s3 = { @@ -50,7 +50,10 @@ in }; }; - services.clickhouse.enable = true; + services.clickhouse = { + enable = true; + inherit package; + }; virtualisation.diskSize = 15 * 1024; virtualisation.memorySize = 4 * 1024; }; diff --git a/pkgs/by-name/cl/clickhouse/generic.nix b/pkgs/by-name/cl/clickhouse/generic.nix index 2edf80df1895..f15194df4721 100644 --- a/pkgs/by-name/cl/clickhouse/generic.nix +++ b/pkgs/by-name/cl/clickhouse/generic.nix @@ -159,7 +159,7 @@ llvmPackages_19.stdenv.mkDerivation (finalAttrs: { requiredSystemFeatures = [ "big-parallel" ]; passthru = { - tests.clickhouse = nixosTests.clickhouse; + tests.clickhouse = if lts then nixosTests.clickhouse-lts else nixosTests.clickhouse; updateScript = nix-update-script { extraArgs = nixUpdateExtraArgs;