nixos/clickhouse: Enable tests for clickhouse-lts

+62 -15
+8 -1
nixos/tests/all-tests.nix
··· 333 333 cinnamon-wayland = runTest ./cinnamon-wayland.nix; 334 334 cjdns = runTest ./cjdns.nix; 335 335 clatd = runTest ./clatd.nix; 336 - clickhouse = import ./clickhouse { inherit runTest; }; 336 + clickhouse = import ./clickhouse { 337 + inherit runTest; 338 + package = pkgs.clickhouse; 339 + }; 340 + clickhouse-lts = import ./clickhouse { 341 + inherit runTest; 342 + package = pkgs.clickhouse-lts; 343 + }; 337 344 cloud-init = runTest ./cloud-init.nix; 338 345 cloud-init-hostname = runTest ./cloud-init-hostname.nix; 339 346 cloudlog = runTest ./cloudlog.nix;
+5 -2
nixos/tests/clickhouse/base.nix
··· 1 - { pkgs, ... }: 1 + { pkgs, package, ... }: 2 2 { 3 3 name = "clickhouse"; 4 4 meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; 5 5 6 6 nodes.machine = { 7 - services.clickhouse.enable = true; 7 + services.clickhouse = { 8 + enable = true; 9 + inherit package; 10 + }; 8 11 virtualisation.memorySize = 4096; 9 12 }; 10 13
+28 -5
nixos/tests/clickhouse/default.nix
··· 1 - { runTest }: 1 + { 2 + runTest, 3 + package, 4 + }: 2 5 3 6 { 4 - base = runTest ./base.nix; 5 - kafka = runTest ./kafka.nix; 6 - keeper = runTest ./keeper.nix; 7 - s3 = runTest ./s3.nix; 7 + base = runTest { 8 + imports = [ ./base.nix ]; 9 + _module.args = { 10 + inherit package; 11 + }; 12 + }; 13 + kafka = runTest { 14 + imports = [ ./kafka.nix ]; 15 + _module.args = { 16 + inherit package; 17 + }; 18 + }; 19 + keeper = runTest { 20 + imports = [ ./keeper.nix ]; 21 + _module.args = { 22 + inherit package; 23 + }; 24 + }; 25 + s3 = runTest { 26 + imports = [ ./s3.nix ]; 27 + _module.args = { 28 + inherit package; 29 + }; 30 + }; 8 31 }
+5 -2
nixos/tests/clickhouse/kafka.nix
··· 1 - { pkgs, ... }: 1 + { pkgs, package, ... }: 2 2 3 3 let 4 4 kafkaNamedCollectionConfig = '' ··· 38 38 }; 39 39 }; 40 40 41 - services.clickhouse.enable = true; 41 + services.clickhouse = { 42 + enable = true; 43 + inherit package; 44 + }; 42 45 virtualisation.memorySize = 4096; 43 46 }; 44 47
+10 -2
nixos/tests/clickhouse/keeper.nix
··· 1 - { lib, pkgs, ... }: 1 + { 2 + lib, 3 + pkgs, 4 + package, 5 + ... 6 + }: 2 7 rec { 3 8 name = "clickhouse-keeper"; 4 9 meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; ··· 94 99 9444 95 100 ]; 96 101 97 - services.clickhouse.enable = true; 102 + services.clickhouse = { 103 + enable = true; 104 + inherit package; 105 + }; 98 106 99 107 systemd.services.clickhouse = { 100 108 after = [ "network-online.target" ];
+5 -2
nixos/tests/clickhouse/s3.nix
··· 1 - { pkgs, ... }: 1 + { pkgs, package, ... }: 2 2 3 3 let 4 4 s3 = { ··· 50 50 }; 51 51 }; 52 52 53 - services.clickhouse.enable = true; 53 + services.clickhouse = { 54 + enable = true; 55 + inherit package; 56 + }; 54 57 virtualisation.diskSize = 15 * 1024; 55 58 virtualisation.memorySize = 4 * 1024; 56 59 };
+1 -1
pkgs/by-name/cl/clickhouse/generic.nix
··· 159 159 requiredSystemFeatures = [ "big-parallel" ]; 160 160 161 161 passthru = { 162 - tests.clickhouse = nixosTests.clickhouse; 162 + tests.clickhouse = if lts then nixosTests.clickhouse-lts else nixosTests.clickhouse; 163 163 164 164 updateScript = nix-update-script { 165 165 extraArgs = nixUpdateExtraArgs;