nixos/clickhouse: Migrate tests from handleTest to runTest

This commit is contained in:
Jonathan Davies 2025-06-15 12:35:59 +00:00
parent 4d60b8f537
commit 2723c76503
No known key found for this signature in database
6 changed files with 450 additions and 462 deletions

View File

@ -306,7 +306,7 @@ in
cinnamon-wayland = runTest ./cinnamon-wayland.nix; cinnamon-wayland = runTest ./cinnamon-wayland.nix;
cjdns = runTest ./cjdns.nix; cjdns = runTest ./cjdns.nix;
clatd = runTest ./clatd.nix; clatd = runTest ./clatd.nix;
clickhouse = handleTest ./clickhouse { }; clickhouse = import ./clickhouse { inherit runTest; };
cloud-init = handleTest ./cloud-init.nix { }; cloud-init = handleTest ./cloud-init.nix { };
cloud-init-hostname = handleTest ./cloud-init-hostname.nix { }; cloud-init-hostname = handleTest ./cloud-init-hostname.nix { };
cloudlog = runTest ./cloudlog.nix; cloudlog = runTest ./cloudlog.nix;

View File

@ -1,6 +1,5 @@
import ../make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }: {
{
name = "clickhouse"; name = "clickhouse";
meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; meta.maintainers = with pkgs.lib.maintainers; [ jpds ];
@ -31,5 +30,4 @@ import ../make-test-python.nix (
"cat ${selectQuery} | clickhouse-client | grep foo" "cat ${selectQuery} | clickhouse-client | grep foo"
) )
''; '';
} }
)

View File

@ -1,12 +1,8 @@
{ { runTest }:
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../../.. { inherit system config; },
}:
{ {
base = import ./base.nix { inherit system pkgs; }; base = runTest ./base.nix;
kafka = import ./kafka.nix { inherit system pkgs; }; kafka = runTest ./kafka.nix;
keeper = import ./keeper.nix { inherit system pkgs; }; keeper = runTest ./keeper.nix;
s3 = import ./s3.nix { inherit system pkgs; }; s3 = runTest ./s3.nix;
} }

View File

@ -1,7 +1,6 @@
import ../make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
kafkaNamedCollectionConfig = '' kafkaNamedCollectionConfig = ''
<clickhouse> <clickhouse>
<named_collections> <named_collections>
@ -26,8 +25,8 @@ import ../make-test-python.nix (
''; '';
kafkaNamedCollection = pkgs.writeText "kafka.xml" kafkaNamedCollectionConfig; kafkaNamedCollection = pkgs.writeText "kafka.xml" kafkaNamedCollectionConfig;
in in
{ {
name = "clickhouse-kafka"; name = "clickhouse-kafka";
meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; meta.maintainers = with pkgs.lib.maintainers; [ jpds ];
@ -170,5 +169,4 @@ import ../make-test-python.nix (
"cat ${selectQuery} | clickhouse-client | grep 74" "cat ${selectQuery} | clickhouse-client | grep 74"
) )
''; '';
} }
)

View File

@ -1,6 +1,5 @@
import ../make-test-python.nix ( { lib, pkgs, ... }:
{ lib, pkgs, ... }: rec {
rec {
name = "clickhouse-keeper"; name = "clickhouse-keeper";
meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; meta.maintainers = with pkgs.lib.maintainers; [ jpds ];
@ -181,5 +180,4 @@ import ../make-test-python.nix (
"cat ${selectCountQuery} | clickhouse-client | grep 100000000" "cat ${selectCountQuery} | clickhouse-client | grep 100000000"
) )
''; '';
} }
)

View File

@ -1,7 +1,6 @@
import ../make-test-python.nix ( { pkgs, ... }:
{ pkgs, ... }:
let let
s3 = { s3 = {
bucket = "clickhouse-bucket"; bucket = "clickhouse-bucket";
accessKey = "BKIKJAA5BMMU2RHO6IBB"; accessKey = "BKIKJAA5BMMU2RHO6IBB";
@ -38,8 +37,8 @@ import ../make-test-python.nix (
</storage_configuration> </storage_configuration>
</clickhouse> </clickhouse>
''; '';
in in
{ {
name = "clickhouse-s3"; name = "clickhouse-s3";
meta.maintainers = with pkgs.lib.maintainers; [ jpds ]; meta.maintainers = with pkgs.lib.maintainers; [ jpds ];
@ -119,5 +118,4 @@ import ../make-test-python.nix (
"mc ls minio/${s3.bucket}", "mc ls minio/${s3.bucket}",
)) ))
''; '';
} }
)