2021-05-07 13:14:40 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import os
|
2021-03-11 20:41:10 +00:00
|
|
|
import sys
|
|
|
|
from testflows.core import *
|
|
|
|
|
|
|
|
append_path(sys.path, "..")
|
|
|
|
|
|
|
|
from helpers.cluster import Cluster
|
|
|
|
from helpers.argparser import argparser
|
|
|
|
from kerberos.requirements.requirements import *
|
|
|
|
|
|
|
|
xfails = {
|
2022-03-22 16:39:58 +00:00
|
|
|
"config/principal and realm specified/:": [
|
|
|
|
(Fail, "https://github.com/ClickHouse/ClickHouse/issues/26197")
|
|
|
|
],
|
2021-03-11 20:41:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@TestModule
|
|
|
|
@Name("kerberos")
|
|
|
|
@ArgumentParser(argparser)
|
2022-03-22 16:39:58 +00:00
|
|
|
@Requirements(RQ_SRS_016_Kerberos("1.0"))
|
2021-03-11 20:41:10 +00:00
|
|
|
@XFails(xfails)
|
2022-03-22 16:39:58 +00:00
|
|
|
def regression(
|
|
|
|
self, local, clickhouse_binary_path, clickhouse_version=None, stress=None
|
|
|
|
):
|
|
|
|
"""ClickHouse Kerberos authentication test regression module."""
|
2021-03-11 20:41:10 +00:00
|
|
|
nodes = {
|
|
|
|
"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"),
|
2022-03-22 16:39:58 +00:00
|
|
|
"kerberos": ("kerberos",),
|
2021-03-11 20:41:10 +00:00
|
|
|
}
|
|
|
|
|
2021-05-10 20:59:47 +00:00
|
|
|
if stress is not None:
|
|
|
|
self.context.stress = stress
|
2022-03-10 01:23:41 +00:00
|
|
|
self.context.clickhouse_version = clickhouse_version
|
2021-05-10 20:59:47 +00:00
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
with Cluster(
|
|
|
|
local,
|
|
|
|
clickhouse_binary_path,
|
|
|
|
nodes=nodes,
|
|
|
|
docker_compose_project_dir=os.path.join(current_dir(), "kerberos_env"),
|
|
|
|
) as cluster:
|
2021-03-11 20:41:10 +00:00
|
|
|
self.context.cluster = cluster
|
|
|
|
|
2021-07-15 08:05:50 +00:00
|
|
|
Feature(run=load("kerberos.tests.generic", "generic"), flags=TE)
|
|
|
|
Feature(run=load("kerberos.tests.config", "config"), flags=TE)
|
|
|
|
Feature(run=load("kerberos.tests.parallel", "parallel"), flags=TE)
|
2021-07-10 16:56:36 +00:00
|
|
|
|
2022-03-22 16:39:58 +00:00
|
|
|
|
2021-03-11 20:41:10 +00:00
|
|
|
if main():
|
|
|
|
regression()
|