nixos/clickhouse: port test to python
This commit is contained in:
parent
103f128dbb
commit
05163ec981
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "clickhouse";
|
name = "clickhouse";
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
|
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ];
|
||||||
|
|
||||||
|
@ -14,12 +14,18 @@ import ./make-test.nix ({ pkgs, ... }: {
|
||||||
selectQuery = pkgs.writeText "select.sql" "SELECT * from `demo`";
|
selectQuery = pkgs.writeText "select.sql" "SELECT * from `demo`";
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
$machine->start();
|
machine.start()
|
||||||
$machine->waitForUnit("clickhouse.service");
|
machine.wait_for_unit("clickhouse.service")
|
||||||
$machine->waitForOpenPort(9000);
|
machine.wait_for_open_port(9000)
|
||||||
|
|
||||||
$machine->succeed("cat ${tableDDL} | clickhouse-client");
|
machine.succeed(
|
||||||
$machine->succeed("cat ${insertQuery} | clickhouse-client");
|
"cat ${tableDDL} | clickhouse-client"
|
||||||
$machine->succeed("cat ${selectQuery} | clickhouse-client | grep foo");
|
)
|
||||||
|
machine.succeed(
|
||||||
|
"cat ${insertQuery} | clickhouse-client"
|
||||||
|
)
|
||||||
|
machine.succeed(
|
||||||
|
"cat ${selectQuery} | clickhouse-client | grep foo"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue