diff options
author | Jan Hrnko <jan.hrnko@satoshilabs.com> | 2019-11-09 19:27:26 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-22 20:38:56 +0100 |
commit | 05163ec981edbac6a1337feaa54e78a453e32094 (patch) | |
tree | e925487042099317771feba90c4a23cc4356fd73 | |
parent | 103f128dbb4552fbf5f05f749793041dcb0b2534 (diff) |
nixos/clickhouse: port test to python
-rw-r--r-- | nixos/tests/clickhouse.nix | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/nixos/tests/clickhouse.nix b/nixos/tests/clickhouse.nix index 7d835069ec4d..2d8a7cf7aa9f 100644 --- a/nixos/tests/clickhouse.nix +++ b/nixos/tests/clickhouse.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "clickhouse"; 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`"; in '' - $machine->start(); - $machine->waitForUnit("clickhouse.service"); - $machine->waitForOpenPort(9000); + machine.start() + machine.wait_for_unit("clickhouse.service") + machine.wait_for_open_port(9000) - $machine->succeed("cat ${tableDDL} | clickhouse-client"); - $machine->succeed("cat ${insertQuery} | clickhouse-client"); - $machine->succeed("cat ${selectQuery} | clickhouse-client | grep foo"); + machine.succeed( + "cat ${tableDDL} | clickhouse-client" + ) + machine.succeed( + "cat ${insertQuery} | clickhouse-client" + ) + machine.succeed( + "cat ${selectQuery} | clickhouse-client | grep foo" + ) ''; }) |