More descriptive error message in test [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-08-23 02:54:33 +03:00
parent a5a2ec6503
commit 0c129ab7f4

View File

@ -28,10 +28,11 @@ perform "describe_table" "DESCRIBE TABLE system.one INTO OUTFILE '${CLICKHOUSE_T
echo "performing test: clickhouse-local"
echo -e '1\t2' | ${CLICKHOUSE_LOCAL} -s --structure 'col1 UInt32, col2 UInt32' --query "SELECT col1 + 1, col2 + 1 FROM table INTO OUTFILE '${CLICKHOUSE_TMP}/test_into_outfile_clickhouse-local.out'"
if [ "$?" -eq 0 ]; then
err=$?
if [ "$err" -eq 0 ]; then
cat "${CLICKHOUSE_TMP}/test_into_outfile_clickhouse-local.out"
else
echo "query failed"
echo "query failed with exit code $err"
fi
rm -f "${CLICKHOUSE_TMP}/test_into_outfile_clickhouse-local.out"