Removed word "exception" from test reference

This commit is contained in:
Gleb Novikov 2019-05-27 09:30:18 +03:00
parent 4b0f7e696d
commit ff6cdaeb98
2 changed files with 8 additions and 6 deletions

View File

@ -1,7 +1,7 @@
1 2
Exception ok
ok
1 2
Exception ok
Exception ok
ok
ok
0 11
7 18

View File

@ -3,6 +3,8 @@
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
EXCEPTION_SUCCESS_TEXT=ok
$CLICKHOUSE_CLIENT --query="DROP TABLE IF EXISTS test_constraints;"
$CLICKHOUSE_CLIENT --query="CREATE TABLE test_constraints
@ -20,7 +22,7 @@ $CLICKHOUSE_CLIENT --query="SELECT * FROM test_constraints;"
# This one must throw and exception
EXCEPTION_TEXT="Some constraints are not satisfied"
$CLICKHOUSE_CLIENT --query="INSERT INTO test_constraints VALUES (3, 4), (1, 0);" 2>&1 \
| grep -q "$EXCEPTION_TEXT" && echo "Exception ok" || echo "Did not thrown an exception"
| grep -q "$EXCEPTION_TEXT" && echo "$EXCEPTION_SUCCESS_TEXT" || echo "Did not thrown an exception"
$CLICKHOUSE_CLIENT --query="SELECT * FROM test_constraints;"
$CLICKHOUSE_CLIENT --query="DROP TABLE test_constraints;"
@ -38,13 +40,13 @@ ENGINE = MergeTree ORDER BY (a);"
# This one must throw an exception
EXCEPTION_TEXT="Some constraints are not satisfied"
$CLICKHOUSE_CLIENT --query="INSERT INTO test_constraints VALUES (1, 2);" 2>&1 \
| grep -q "$EXCEPTION_TEXT" && echo "Exception ok" || echo "Did not thrown an exception"
| grep -q "$EXCEPTION_TEXT" && echo "$EXCEPTION_SUCCESS_TEXT" || echo "Did not thrown an exception"
$CLICKHOUSE_CLIENT --query="SELECT * FROM test_constraints;"
# This one must throw an exception
EXCEPTION_TEXT="Some constraints are not satisfied"
$CLICKHOUSE_CLIENT --query="INSERT INTO test_constraints VALUES (5, 16), (10, 11);" 2>&1 \
| grep -q "$EXCEPTION_TEXT" && echo "Exception ok" || echo "Did not thrown an exception"
| grep -q "$EXCEPTION_TEXT" && echo "$EXCEPTION_SUCCESS_TEXT" || echo "Did not thrown an exception"
$CLICKHOUSE_CLIENT --query="SELECT * FROM test_constraints;"
# This one must succeed