Merge pull request #52345 from r-ryantm/auto-update/clickhouse
clickhouse: 18.14.9 -> 18.14.18
This commit is contained in:
@@ -70,6 +70,11 @@ with lib;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.clickhouse ];
|
||||
|
||||
# startup requires a `/etc/localtime` which only if exists if `time.timeZone != null`
|
||||
time.timeZone = mkDefault "UTC";
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ in
|
||||
cfssl = handleTestOn ["x86_64-linux"] ./cfssl.nix {};
|
||||
chromium = (handleTestOn ["x86_64-linux"] ./chromium.nix {}).stable or {};
|
||||
cjdns = handleTest ./cjdns.nix {};
|
||||
clickhouse = handleTest ./clickhouse.nix {};
|
||||
cloud-init = handleTest ./cloud-init.nix {};
|
||||
codimd = handleTest ./codimd.nix {};
|
||||
containers-bridge = handleTest ./containers-bridge.nix {};
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import ./make-test.nix ({ pkgs, ... }: {
|
||||
name = "clickhouse";
|
||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
|
||||
|
||||
machine = {
|
||||
services.clickhouse.enable = true;
|
||||
};
|
||||
|
||||
testScript =
|
||||
let
|
||||
# work around quote/substitution complexity by Nix, Perl, bash and SQL.
|
||||
tableDDL = pkgs.writeText "ddl.sql" "CREATE TABLE `demo` (`value` FixedString(10)) engine = MergeTree PARTITION BY value ORDER BY tuple();";
|
||||
insertQuery = pkgs.writeText "insert.sql" "INSERT INTO `demo` (`value`) VALUES ('foo');";
|
||||
selectQuery = pkgs.writeText "select.sql" "SELECT * from `demo`";
|
||||
in
|
||||
''
|
||||
$machine->start();
|
||||
$machine->waitForUnit("clickhouse.service");
|
||||
$machine->waitForOpenPort(9000);
|
||||
|
||||
$machine->succeed("cat ${tableDDL} | clickhouse-client");
|
||||
$machine->succeed("cat ${insertQuery} | clickhouse-client");
|
||||
$machine->succeed("cat ${selectQuery} | clickhouse-client | grep foo");
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user