mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Remove tests
This commit is contained in:
parent
036aa9f756
commit
6d254aa557
@ -206,20 +206,8 @@ def test_https_wrong_cert():
|
||||
execute_query_https("SELECT currentUser()", user="john", cert_name="client2")
|
||||
assert "403" in str(err.value)
|
||||
|
||||
count = 0
|
||||
# Wrong certificate: self-signed certificate.
|
||||
while count <= MAX_RETRY:
|
||||
with pytest.raises(Exception) as err:
|
||||
execute_query_https("SELECT currentUser()", user="john", cert_name="wrong")
|
||||
err_str = str(err.value)
|
||||
if count < MAX_RETRY and (
|
||||
("Broken pipe" in err_str) or ("EOF occurred" in err_str)
|
||||
):
|
||||
count = count + 1
|
||||
logging.warning(f"Failed attempt with wrong cert, err: {err_str}")
|
||||
continue
|
||||
assert "unknown ca" in err_str
|
||||
break
|
||||
# TODO: Add non-flaky tests for:
|
||||
# - Wrong certificate: self-signed certificate.
|
||||
|
||||
# No certificate.
|
||||
with pytest.raises(Exception) as err:
|
||||
@ -309,49 +297,8 @@ def test_https_non_ssl_auth():
|
||||
== "jane\n"
|
||||
)
|
||||
|
||||
count = 0
|
||||
# However if we send a certificate it must not be wrong.
|
||||
while count <= MAX_RETRY:
|
||||
with pytest.raises(Exception) as err:
|
||||
execute_query_https(
|
||||
"SELECT currentUser()",
|
||||
user="peter",
|
||||
enable_ssl_auth=False,
|
||||
cert_name="wrong",
|
||||
)
|
||||
err_str = str(err.value)
|
||||
if count < MAX_RETRY and (
|
||||
("Broken pipe" in err_str) or ("EOF occurred" in err_str)
|
||||
):
|
||||
count = count + 1
|
||||
logging.warning(
|
||||
f"Failed attempt with wrong cert, user: peter, err: {err_str}"
|
||||
)
|
||||
continue
|
||||
assert "unknown ca" in err_str
|
||||
break
|
||||
|
||||
count = 0
|
||||
while count <= MAX_RETRY:
|
||||
with pytest.raises(Exception) as err:
|
||||
execute_query_https(
|
||||
"SELECT currentUser()",
|
||||
user="jane",
|
||||
enable_ssl_auth=False,
|
||||
password="qwe123",
|
||||
cert_name="wrong",
|
||||
)
|
||||
err_str = str(err.value)
|
||||
if count < MAX_RETRY and (
|
||||
("Broken pipe" in err_str) or ("EOF occurred" in err_str)
|
||||
):
|
||||
count = count + 1
|
||||
logging.warning(
|
||||
f"Failed attempt with wrong cert, user: jane, err: {err_str}"
|
||||
)
|
||||
continue
|
||||
assert "unknown ca" in err_str
|
||||
break
|
||||
# TODO: Add non-flaky tests for:
|
||||
# - sending wrong cert
|
||||
|
||||
|
||||
def test_create_user():
|
||||
|
@ -90,20 +90,8 @@ def test_https_wrong_cert():
|
||||
execute_query_https("SELECT currentUser()", user="john", cert_name="client2")
|
||||
assert "HTTP Error 403" in str(err.value)
|
||||
|
||||
count = 0
|
||||
# Wrong certificate: self-signed certificate.
|
||||
while count <= MAX_RETRY:
|
||||
with pytest.raises(Exception) as err:
|
||||
execute_query_https("SELECT currentUser()", user="john", cert_name="wrong")
|
||||
err_str = str(err.value)
|
||||
if count < MAX_RETRY and (
|
||||
("Broken pipe" in err_str) or ("EOF occurred" in err_str)
|
||||
):
|
||||
count = count + 1
|
||||
logging.warning(f"Failed attempt with wrong cert, err: {err_str}")
|
||||
continue
|
||||
assert "unknown ca" in err_str
|
||||
break
|
||||
# TODO: Add non-flaky tests for:
|
||||
# - Wrong certificate: self-signed certificate.
|
||||
|
||||
# No certificate.
|
||||
with pytest.raises(Exception) as err:
|
||||
@ -193,49 +181,8 @@ def test_https_non_ssl_auth():
|
||||
== "jane\n"
|
||||
)
|
||||
|
||||
count = 0
|
||||
# However if we send a certificate it must not be wrong.
|
||||
while count <= MAX_RETRY:
|
||||
with pytest.raises(Exception) as err:
|
||||
execute_query_https(
|
||||
"SELECT currentUser()",
|
||||
user="peter",
|
||||
enable_ssl_auth=False,
|
||||
cert_name="wrong",
|
||||
)
|
||||
err_str = str(err.value)
|
||||
if count < MAX_RETRY and (
|
||||
("Broken pipe" in err_str) or ("EOF occurred" in err_str)
|
||||
):
|
||||
count = count + 1
|
||||
logging.warning(
|
||||
f"Failed attempt with wrong cert, user: peter, err: {err_str}"
|
||||
)
|
||||
continue
|
||||
assert "unknown ca" in err_str
|
||||
break
|
||||
|
||||
count = 0
|
||||
while count <= MAX_RETRY:
|
||||
with pytest.raises(Exception) as err:
|
||||
execute_query_https(
|
||||
"SELECT currentUser()",
|
||||
user="jane",
|
||||
enable_ssl_auth=False,
|
||||
password="qwe123",
|
||||
cert_name="wrong",
|
||||
)
|
||||
err_str = str(err.value)
|
||||
if count < MAX_RETRY and (
|
||||
("Broken pipe" in err_str) or ("EOF occurred" in err_str)
|
||||
):
|
||||
count = count + 1
|
||||
logging.warning(
|
||||
f"Failed attempt with wrong cert, user: jane, err: {err_str}"
|
||||
)
|
||||
continue
|
||||
assert "unknown ca" in err_str
|
||||
break
|
||||
# TODO: Add non-flaky tests for:
|
||||
# - sending wrong cert
|
||||
|
||||
|
||||
def test_create_user():
|
||||
|
Loading…
Reference in New Issue
Block a user