fix 'env bash -e'

This commit is contained in:
proller 2016-12-21 23:43:35 +03:00
parent 1c849f14af
commit 999b181aa5
8 changed files with 32 additions and 8 deletions

View File

@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
# Скрипт довольно хрупкий.

View File

@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
echo "
DROP TABLE IF EXISTS test.two_blocks;

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55);/' | clickhouse-client -n --receive_timeout=1 --max_block_size=1 | grep -vE '^55$' && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=1 | wc -l | grep -vE '^5500$' && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
for i in {1..10}; do seq 1 10 | sed 's/.*/SELECT 1 % ((number + 500) % 1000) FROM system.numbers_mt LIMIT 1000;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=1 >/dev/null 2>&1 && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM system.numbers_mt LIMIT 111;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=$(($RANDOM % 123 + 1)) | wc -l | grep -vE '^11100$' && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -1,3 +1,6 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
for i in {1..10}; do sleep 0.0$RANDOM; seq 1 100 | sed 's/.*/SELECT 1 % (number - 10000000) FROM system.numbers_mt;/' | clickhouse-client -n --receive_timeout=1 --max_block_size=10 >/dev/null 2>&1 && echo 'Fail!' && break; echo -n '.'; done; echo

View File

@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
set -o errexit
set -o pipefail
clickhouse-client -n --query="
DROP TABLE IF EXISTS test.users;