Fixed test after refactoring. [#CLICKHOUSE-2]

This commit is contained in:
Vitaliy Lyudvichenko 2018-03-13 23:49:13 +03:00
parent 32d4bcc1b0
commit 16c8aefba2

View File

@ -20,15 +20,15 @@ function ch_url() {
# Check correct exceptions handling # Check correct exceptions handling
exception_pattern="Code: 307, e\.displayText() = DB::Exception:[[:print:]]* e\.what() = DB::Exception$" exception_pattern="displayText() = DB::Exception:[[:print:]]* e\.what() = DB::Exception"
function check_only_exception() { function check_only_exception() {
local res=`ch_url "$1" "$2"` local res=`ch_url "$1" "$2"`
#(echo "$res") #(echo "$res")
#(echo "$res" | wc -l) #(echo "$res" | wc -l)
#(echo "$res" | grep -c "^$exception_pattern") #(echo "$res" | grep -c "$exception_pattern")
[[ `echo "$res" | wc -l` -eq 1 ]] || echo FAIL 1 $@ [[ `echo "$res" | wc -l` -eq 1 ]] || echo FAIL 1 $@
[[ $(echo "$res" | grep -c "^$exception_pattern") -eq 1 ]] || echo FAIL 2 $@ [[ $(echo "$res" | grep -c "$exception_pattern") -eq 1 ]] || echo FAIL 2 $@
} }
function check_last_line_exception() { function check_last_line_exception() {