Skip to content

Commit

Permalink
maybe multiservice is to blame?
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed Feb 21, 2024
1 parent 919fef1 commit 800ae72
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions nix/clickhouse/clickhouse_test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
enable = true;
port = 9000;
extraConfig.http_port = 9050;
};
services.clickhouse."clickhouse2" = {
enable = true;
port = 9001;
extraConfig.http_port = 9051;
initialDatabases = [
{
name = "sample_db";
Expand All @@ -16,8 +11,6 @@
];
};

# avoid both the processes trying to create `data` directory at the same time
settings.processes."clickhouse2-init".depends_on."clickhouse1-init".condition = "process_completed_successfully";
settings.processes.test =
let
cfg = config.services.clickhouse."clickhouse1";
Expand Down Expand Up @@ -47,11 +40,11 @@
echo "Test schemas"
# schemas test
clickhouse-client --host 127.0.0.1 --port 9001 --query "SELECT * FROM sample_db.ride WHERE short_id = 'test_ride';" | grep test_ride
clickhouse-client --host 127.0.0.1 --port 9000 --query "SELECT * FROM sample_db.ride WHERE short_id = 'test_ride';" | grep test_ride
echo "Completed tests"
'';
name = "clickhouse-test";
};
depends_on."clickhouse2".condition = "process_healthy";
depends_on."clickhouse1".condition = "process_healthy";
};
}

0 comments on commit 800ae72

Please sign in to comment.