Add a test

This commit is contained in:
Alexey Milovidov 2024-07-06 02:16:51 +02:00
parent c7c77a3322
commit e2885b1cfa
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1 @@
Hello, world!

View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} --multiquery "
DROP TABLE IF EXISTS test;
CREATE TABLE test (s String) ORDER BY ();
INSERT INTO test VALUES ('Hello, world!');
"
${CLICKHOUSE_LOCAL} --multiquery "
CREATE NAMED COLLECTION mydb AS host = '${CLICKHOUSE_HOST}', port = ${CLICKHOUSE_PORT_TCP}, user = 'default', password = '', db = '${CLICKHOUSE_DATABASE}';
SELECT * FROM remote(mydb, table = 'test');
"
${CLICKHOUSE_CLIENT} --multiquery "
DROP TABLE test;
"