Skip to content

Commit

Permalink
Merge pull request ClickHouse#61530 from ClickHouse/fix-client-s
Browse files Browse the repository at this point in the history
Fix client `-s` argument
  • Loading branch information
Felixoid authored Mar 21, 2024
2 parents add1613 + 463b90e commit 5b0610b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion programs/client/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ void Client::addOptions(OptionsDescription & options_description)
("config,c", po::value<std::string>(), "config-file path (another shorthand)")
("connection", po::value<std::string>(), "connection to use (from the client config), by default connection name is hostname")
("secure,s", "Use TLS connection")
("no-secure,s", "Don't use TLS connection")
("no-secure", "Don't use TLS connection")
("user,u", po::value<std::string>()->default_value("default"), "user")
("password", po::value<std::string>(), "password")
("ask-password", "ask-password")
Expand Down
2 changes: 2 additions & 0 deletions tests/queries/0_stateless/00505_secure.reference
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0
1
2
3
4
Expand Down
6 changes: 6 additions & 0 deletions tests/queries/0_stateless/00505_secure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh

$CLICKHOUSE_CLIENT --no-secure -q "SELECT 0;"

# Use $CLICKHOUSE_CLIENT_SECURE, but replace `--secure` by `-s` to test it
CLICKHOUSE_CLIENT_S=${CLICKHOUSE_CLIENT_SECURE/ --secure / -s }
$CLICKHOUSE_CLIENT_S -q "SELECT 1;"

$CLICKHOUSE_CLIENT_SECURE -q "SELECT 2;"

#disable test
Expand Down

0 comments on commit 5b0610b

Please sign in to comment.