ClickHouse/tests/testflows/ldap/authentication/regression.py

67 lines
2.7 KiB
Python
Raw Normal View History

2020-09-03 13:53:34 +00:00
#!/usr/bin/env python3
import sys
from testflows.core import *
append_path(sys.path, "..", "..")
from helpers.cluster import Cluster
from helpers.argparser import argparser
from ldap.authentication.requirements import *
# Cross-outs of known fails
xfails = {
"connection protocols/tls/tls_require_cert='try'":
[(Fail, "can't be tested with self-signed certificates")],
"connection protocols/tls/tls_require_cert='demand'":
[(Fail, "can't be tested with self-signed certificates")],
"connection protocols/starttls/tls_require_cert='try'":
[(Fail, "can't be tested with self-signed certificates")],
"connection protocols/starttls/tls_require_cert='demand'":
[(Fail, "can't be tested with self-signed certificates")],
"connection protocols/tls require cert default demand":
[(Fail, "can't be tested with self-signed certificates")],
"connection protocols/starttls with custom port":
[(Fail, "it seems that starttls is not enabled by default on custom plain-text ports in LDAP server")],
"connection protocols/tls cipher suite":
2021-01-05 02:30:24 +00:00
[(Fail, "can't get it to work")],
"external user directory/user authentications/valid verification cooldown value ldap unavailable":
2021-01-05 03:26:53 +00:00
[(Fail, "flaky, ask Vitaly Zakaznikov, Telegram @vzakaznikov")],
"user authentications/rbac=True/verification cooldown/verification cooldown performance":
2021-01-05 02:30:24 +00:00
[(Fail, "flaky, ask Vitaly Zakaznikov, Telegram @vzakaznikov")]
2020-09-03 13:53:34 +00:00
}
@TestFeature
@Name("authentication")
@ArgumentParser(argparser)
@Specifications(
SRS_007_ClickHouse_Authentication_of_Users_via_LDAP
)
2020-09-03 13:53:34 +00:00
@Requirements(
RQ_SRS_007_LDAP_Authentication("1.0")
)
@XFails(xfails)
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None):
2020-09-03 13:53:34 +00:00
"""ClickHouse integration with LDAP regression module.
"""
nodes = {
"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"),
}
with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster:
self.context.cluster = cluster
if stress is not None or not hasattr(self.context, "stress"):
self.context.stress = stress
if parallel is not None or not hasattr(self.context, "parallel"):
self.context.parallel = parallel
2020-09-03 13:53:34 +00:00
Scenario(run=load("ldap.authentication.tests.sanity", "scenario"))
Scenario(run=load("ldap.authentication.tests.multiple_servers", "scenario"))
Feature(run=load("ldap.authentication.tests.connections", "feature"))
Feature(run=load("ldap.authentication.tests.server_config", "feature"))
Feature(run=load("ldap.authentication.tests.user_config", "feature"))
Feature(run=load("ldap.authentication.tests.authentications", "feature"))
if main():
regression()