Change test '00305_http_and_readonly' because DROP TABLE IF EXISTS now works in readonly mode in case the table doesn't exist.

This commit is contained in:
Vitaly Baranov 2020-01-30 01:20:13 +03:00
parent 2aa58193c8
commit a5a2fe1260
2 changed files with 15 additions and 6 deletions

View File

@ -20,3 +20,7 @@ Ok
0
Ok
Ok
Ok
0
0
0

View File

@ -13,11 +13,16 @@ ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+name,value,changed+FROM+s
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+name,value,changed+FROM+system.settings+WHERE+name+IN+('readonly','max_rows_to_read')&readonly=1&max_rows_to_read=10000&default_format=PrettySpaceNoEscapes" -d' '
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=SELECT+name,value,changed+FROM+system.settings+WHERE+name+IN+('readonly','max_rows_to_read')&readonly=2&max_rows_to_read=10000&default_format=PrettySpaceNoEscapes" -d' '
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&query=DROP+TABLE+IF+EXISTS+nonexistent" 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&readonly=0&query=DROP+TABLE+IF+EXISTS+nonexistent" 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&query=CREATE+TABLE+table_00305a(x+Int8)+ENGINE=Log" 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&readonly=0&query=CREATE+TABLE+table_00305a(x+Int8)+ENGINE=Log" 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=DROP+TABLE+IF+EXISTS+nonexistent" -d ' ' | wc -l
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&readonly=0&query=DROP+TABLE+IF+EXISTS+nonexistent" -d ' ' | wc -l
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=CREATE+TABLE+table_00305a(x+Int8)+ENGINE=Log" -d ' ' | wc -l
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&readonly=0&query=CREATE+TABLE+table_00305b(x+Int8)+ENGINE=Log" -d ' ' | wc -l
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&readonly=1&query=DROP+TABLE+IF+EXISTS+nonexistent" -d ' ' 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&readonly=2&query=DROP+TABLE+IF+EXISTS+nonexistent" -d ' ' 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&readonly=1&query=CREATE+TABLE+table_00305c(x+Int8)+ENGINE=Log" -d ' ' 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&readonly=2&query=CREATE+TABLE+table_00305c(x+Int8)+ENGINE=Log" -d ' ' 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -vsS "${CLICKHOUSE_URL}&query=DROP+TABLE+table_00305a" 2>&1 | grep -q '500 Internal Server Error' && echo 'Ok' || echo 'Fail'
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=DROP+TABLE+table_00305a" -d ' ' | wc -l
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=DROP+TABLE+table_00305b" -d ' ' | wc -l
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&query=DROP+TABLE+IF+EXISTS+table_00305c" | wc -l