mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fix tests
This commit is contained in:
parent
6b300ab44f
commit
a051eb2a5d
@ -51,7 +51,7 @@ DatabaseHDFS::DatabaseHDFS(const String & name_, const String & source_url, Cont
|
||||
if (!source.empty())
|
||||
{
|
||||
if (!re2::RE2::FullMatch(source, std::string(HDFS_HOST_REGEXP)))
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad hdfs host: {}. "
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad HDFS host: {}. "
|
||||
"It should have structure 'hdfs://<host_name>:<port>'", source);
|
||||
|
||||
context_->getGlobalContext()->getRemoteHostFilter().checkURL(Poco::URI(source));
|
||||
|
@ -192,7 +192,7 @@ String getNameNodeCluster(const String &hdfs_url)
|
||||
void checkHDFSURL(const String & url)
|
||||
{
|
||||
if (!re2::RE2::FullMatch(url, std::string(HDFS_URL_REGEXP)))
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad hdfs url: {}. It should have structure 'hdfs://<host_name>:<port>/<path>'", url);
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad HDFS URL: {}. It should have structure 'hdfs://<host_name>:<port>/<path>'", url);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ def test_bad_hdfs_uri(started_cluster):
|
||||
)
|
||||
except Exception as ex:
|
||||
print(ex)
|
||||
assert "Bad hdfs url" in str(ex)
|
||||
assert "Bad HDFS URL" in str(ex)
|
||||
try:
|
||||
node1.query(
|
||||
"create table BadStorage2 (id UInt32, name String, weight Float64) ENGINE = HDFS('hdfs://hdfs100500:9000/other_storage', 'TSV')"
|
||||
|
Loading…
Reference in New Issue
Block a user