Skip to content

Commit

Permalink
Relax check-style condition because in SQL-based tests there's no $
Browse files Browse the repository at this point in the history
  • Loading branch information
pamarcos committed Apr 2, 2024
1 parent 8b1fcf3 commit 73e5620
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/check-style/check-style
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ tests_with_query_log=( $(
) )
for test_case in "${tests_with_query_log[@]}"; do
grep -qE current_database.*currentDatabase "$test_case" || {
grep -qE 'current_database.*\$CLICKHOUSE_DATABASE' "$test_case"
grep -qE 'current_database.*CLICKHOUSE_DATABASE' "$test_case"
} || echo "Queries to system.query_log/system.query_thread_log does not have current_database = currentDatabase() condition in $test_case"
done

Expand Down Expand Up @@ -206,12 +206,12 @@ tests_with_database_column=( $(
) )
for test_case in "${tests_with_database_column[@]}"; do
grep -qE database.*currentDatabase "$test_case" || {
grep -qE 'database.*\$CLICKHOUSE_DATABASE' "$test_case"
grep -qE 'database.*CLICKHOUSE_DATABASE' "$test_case"
} || {
# explicit database
grep -qE "database[ ]*=[ ]*'" "$test_case"
} || {
echo "Queries to ${tables_with_database_column[*]} does not have database = currentDatabase()/\$CLICKHOUSE_DATABASE condition in $test_case"
echo "Queries to ${tables_with_database_column[*]} does not have database = currentDatabase()/CLICKHOUSE_DATABASE condition in $test_case"
}
done

Expand Down

0 comments on commit 73e5620

Please sign in to comment.