def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse integration with LDAP regression module. """ top().terminating = False nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "ldap_authentication_env")) as cluster: self.context.cluster = cluster 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"))
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """RBAC regression. """ top().terminating = False nodes = {"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3")} if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "rbac_env")) as cluster: self.context.cluster = cluster Feature(run=load("rbac.tests.syntax.feature", "feature")) Feature(run=load("rbac.tests.privileges.feature", "feature")) Feature(run=load("rbac.tests.views.feature", "feature"))
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=None): """ClickHouse LDAP role mapping regression module. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } self.context.clickhouse_version = clickhouse_version if stress is not None: self.context.stress = stress from platform import processor as current_cpu folder_name = os.path.basename(current_dir()) if current_cpu() == 'aarch64': env = f"{folder_name}_env_arm64" else: env = f"{folder_name}_env" with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), env)) as cluster: self.context.cluster = cluster Scenario(run=load("ldap.authentication.tests.sanity", "scenario"), name="ldap sanity") Feature(run=load("ldap.role_mapping.tests.server_config", "feature")) Feature(run=load("ldap.role_mapping.tests.mapping", "feature")) Feature(run=load("ldap.role_mapping.tests.user_dn_detection", "feature")) Feature(run=load("ldap.role_mapping.tests.cluster_secret", "feature"))
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse Kerberos authentication test regression module. """ top().terminating = False nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), "kerberos": ("kerberos", ), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "kerberos_env")) as cluster: self.context.cluster = cluster 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)
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=None): """RBAC regression.""" nodes = {"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3")} self.context.clickhouse_version = clickhouse_version if stress is not None: self.context.stress = stress from platform import processor as current_cpu folder_name = os.path.basename(current_dir()) if current_cpu() == "aarch64": env = f"{folder_name}_env_arm64" else: env = f"{folder_name}_env" with Cluster( local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), env), ) as cluster: self.context.cluster = cluster Feature(run=load("rbac.tests.syntax.feature", "feature")) Feature(run=load("rbac.tests.privileges.feature", "feature")) Feature(run=load("rbac.tests.views.feature", "feature"))
def regression(self, local, clickhouse_binary_path, parallel=False, stress=False): """ClickHouse DateTime64 Extended Range regression module. """ top().terminating = False nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), "datetime64_extended_range_env")) as cluster: self.context.cluster = cluster tasks = [] with Pool(2) as pool: try: run_scenario(pool, tasks, Scenario(test=load("datetime64_extended_range.tests.generic", "generic"))) run_scenario(pool, tasks, Scenario(test=load("datetime64_extended_range.tests.non_existent_time", "feature"))) run_scenario(pool, tasks, Scenario(test=load("datetime64_extended_range.tests.reference_times", "reference_times"))) run_scenario(pool, tasks, Scenario(test=load("datetime64_extended_range.tests.date_time_functions", "date_time_funcs"))) run_scenario(pool, tasks, Scenario(test=load("datetime64_extended_range.tests.type_conversion", "type_conversion"))) finally: join(tasks)
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse LDAP external user directory 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 Scenario(run=load("ldap.authentication.tests.sanity", "scenario")) Scenario( run=load("ldap.external_user_directory.tests.simple", "scenario")) Feature( run=load("ldap.external_user_directory.tests.restart", "feature")) Feature(run=load("ldap.external_user_directory.tests.server_config", "feature")) Feature(run=load( "ldap.external_user_directory.tests.external_user_directory_config", "feature")) Feature(run=load("ldap.external_user_directory.tests.connections", "feature")) Feature(run=load("ldap.external_user_directory.tests.authentications", "feature")) Feature( run=load("ldap.external_user_directory.tests.roles", "feature"))
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """Extended precision data type regression. """ top().terminating = False nodes = {"clickhouse": ("clickhouse1", )} with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "extended-precision-data-type_env")) as cluster: self.context.cluster = cluster self.context.stress = stress if parallel is not None: self.context.parallel = parallel Feature( run=load("extended_precision_data_types.tests.feature", "feature"))
def regression(self, local, clickhouse_binary_path, clickhouse_version, stress=None): """Simple example of how you can use TestFlows to test ClickHouse. """ nodes = { "clickhouse": ("clickhouse1", ), } self.context.clickhouse_version = clickhouse_version if stress is not None: self.context.stress = stress folder_name = os.path.basename(current_dir()) if current_cpu() == 'aarch64': env = f"{folder_name}_env_arm64" else: env = f"{folder_name}_env" with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), env)) as cluster: self.context.cluster = cluster Scenario(run=load("example.tests.example", "scenario"))
def regression(self, local, clickhouse_binary_path, parallel=False, stress=False): """ClickHouse DateTime64 Extended Range regression module. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster self.context.parallel = parallel self.context.stress = stress Scenario(run=load("datetime64_extended_range.tests.generic", "generic"), flags=TE) Scenario(run=load("datetime64_extended_range.tests.non_existent_time", "feature"), flags=TE) Scenario(run=load("datetime64_extended_range.tests.reference_times", "reference_times"), flags=TE) Scenario(run=load( "datetime64_extended_range.tests.date_time_functions", "date_time_funcs"), flags=TE) Scenario(run=load("datetime64_extended_range.tests.type_conversion", "type_conversion"), flags=TE)
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """Simple example of how you can use TestFlows to test ClickHouse. """ top().terminating = False nodes = { "clickhouse": ("clickhouse1", ), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "example_env")) as cluster: self.context.cluster = cluster Scenario(run=load("example.tests.example", "scenario"))
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse LDAP role mapping regression module. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "ldap_role_mapping_env")) as cluster: self.context.cluster = cluster Scenario(run=load("ldap.authentication.tests.sanity", "scenario"), name="ldap sanity") Feature(run=load("ldap.role_mapping.tests.server_config", "feature")) Feature(run=load("ldap.role_mapping.tests.mapping", "feature"))
def regression(self, local, clickhouse_binary_path): """RBAC regression. """ nodes = {"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3")} with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster Feature(run=load("rbac.tests.syntax.feature", "feature"), flags=TE)
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=None): """ClickHouse AES encryption functions regression module.""" nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress self.context.clickhouse_version = clickhouse_version with Cluster( local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), "aes_encryption_env"), ) as cluster: self.context.cluster = cluster with Pool(5) as pool: try: Feature( run=load("aes_encryption.tests.encrypt", "feature"), flags=TE, parallel=True, executor=pool, ) Feature( run=load("aes_encryption.tests.decrypt", "feature"), flags=TE, parallel=True, executor=pool, ) Feature( run=load("aes_encryption.tests.encrypt_mysql", "feature"), flags=TE, parallel=True, executor=pool, ) Feature( run=load("aes_encryption.tests.decrypt_mysql", "feature"), flags=TE, parallel=True, executor=pool, ) Feature( run=load("aes_encryption.tests.compatibility.feature", "feature"), flags=TE, parallel=True, executor=pool, ) finally: join()
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse AES encryption functions regression module. """ top().terminating = False nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "aes_encryption_env")) as cluster: self.context.cluster = cluster tasks = [] with Pool(5) as pool: try: run_scenario( pool, tasks, Feature(test=load("aes_encryption.tests.encrypt", "feature"), flags=TE)) run_scenario( pool, tasks, Feature(test=load("aes_encryption.tests.decrypt", "feature"), flags=TE)) run_scenario( pool, tasks, Feature(test=load("aes_encryption.tests.encrypt_mysql", "feature"), flags=TE)) run_scenario( pool, tasks, Feature(test=load("aes_encryption.tests.decrypt_mysql", "feature"), flags=TE)) run_scenario( pool, tasks, Feature(test=load( "aes_encryption.tests.compatibility.feature", "feature"), flags=TE)) finally: join(tasks)
def regression(self, local, clickhouse_binary_path): """Simple example of how you can use TestFlows to test ClickHouse. """ nodes = { "clickhouse": ("clickhouse1", ), } with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster Scenario(run=load("example.tests.example", "scenario"))
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=False): """ClickHouse DateTime64 Extended Range regression module. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress self.context.clickhouse_version = clickhouse_version with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "datetime64_extended_range_env")) as cluster: self.context.cluster = cluster with Pool(2) as pool: try: Scenario(run=load("datetime64_extended_range.tests.generic", "generic"), parallel=True, executor=pool) Scenario(run=load( "datetime64_extended_range.tests.non_existent_time", "feature"), parallel=True, executor=pool) Scenario(run=load( "datetime64_extended_range.tests.reference_times", "reference_times"), parallel=True, executor=pool) Scenario(run=load( "datetime64_extended_range.tests.date_time_functions", "date_time_funcs"), parallel=True, executor=pool) Scenario(run=load( "datetime64_extended_range.tests.type_conversion", "type_conversion"), parallel=True, executor=pool) finally: join()
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse AES encryption functions regression module. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster Feature(run=load("aes_encryption.tests.encrypt", "feature"), flags=TE) Feature(run=load("aes_encryption.tests.decrypt", "feature"), flags=TE) Feature(run=load("aes_encryption.tests.encrypt_mysql", "feature"), flags=TE) Feature(run=load("aes_encryption.tests.decrypt_mysql", "feature"), flags=TE) Feature(run=load("aes_encryption.tests.compatibility.feature", "feature"), flags=TE)
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=None): """ClickHouse LDAP external user directory regression module.""" nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } self.context.clickhouse_version = clickhouse_version if stress is not None: self.context.stress = stress from platform import processor as current_cpu folder_name = os.path.basename(current_dir()) if current_cpu() == "aarch64": env = f"{folder_name}_env_arm64" else: env = f"{folder_name}_env" with Cluster( local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), env), ) as cluster: self.context.cluster = cluster Scenario(run=load("ldap.authentication.tests.sanity", "scenario")) Scenario( run=load("ldap.external_user_directory.tests.simple", "scenario")) Feature( run=load("ldap.external_user_directory.tests.restart", "feature")) Feature(run=load("ldap.external_user_directory.tests.server_config", "feature")) Feature(run=load( "ldap.external_user_directory.tests.external_user_directory_config", "feature", )) Feature(run=load("ldap.external_user_directory.tests.connections", "feature")) Feature(run=load("ldap.external_user_directory.tests.authentications", "feature")) Feature( run=load("ldap.external_user_directory.tests.roles", "feature"))
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """Map type regression. """ nodes = {"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3")} with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster self.context.stress = stress if parallel is not None: self.context.parallel = parallel Feature(run=load("map_type.tests.feature", "feature"))
def regression(self, local, clickhouse_binary_path, stress=None): """Map type regression. """ nodes = {"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3")} if stress is not None: self.context.stress = stress with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "map_type_env")) as cluster: self.context.cluster = cluster Feature(run=load("map_type.tests.feature", "feature"))
def regression(self, local, clickhouse_binary_path): """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 Scenario(run=load("ldap.tests.sanity", "scenario")) Scenario(run=load("ldap.tests.multiple_servers", "scenario")) Feature(run=load("ldap.tests.connections", "feature")) Feature(run=load("ldap.tests.server_config", "feature")) Feature(run=load("ldap.tests.user_config", "feature")) Feature(run=load("ldap.tests.authentications", "feature"))
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=None): """Window functions regression. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3") } if stress is not None: self.context.stress = stress self.context.clickhouse_version = clickhouse_version with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join(current_dir(), "window_functions_env")) as cluster: self.context.cluster = cluster Feature(run=load("window_functions.tests.feature", "feature"), flags=TE)
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """RBAC regression. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3") } with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster self.context.stress = stress if parallel is not None: self.context.parallel = parallel Feature(run=load("rbac.tests.syntax.feature", "feature"), flags=TE) Feature(run=load("rbac.tests.privileges.feature", "feature"), flags=TE) Feature(run=load("rbac.tests.views.feature", "feature"), flags=TE)
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """Window functions regression. """ nodes = {"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3")} with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster: self.context.cluster = cluster self.context.stress = stress if parallel is not None: self.context.parallel = parallel Feature(run=load("window_functions.tests.feature", "feature"), flags=TE)
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse LDAP role mapping 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 Scenario(run=load("ldap.authentication.tests.sanity", "scenario"), name="ldap sanity") Feature(run=load("ldap.role_mapping.tests.server_config", "feature")) Feature(run=load("ldap.role_mapping.tests.mapping", "feature"))
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): """ClickHouse LDAP external user directory regression module. """ nodes = { "clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"), } if stress is not None: self.context.stress = stress if parallel is not None: self.context.parallel = parallel with Cluster(local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "ldap_external_user_directory_env")) as cluster: self.context.cluster = cluster Scenario(run=load("ldap.authentication.tests.sanity", "scenario")) Scenario( run=load("ldap.external_user_directory.tests.simple", "scenario")) Feature( run=load("ldap.external_user_directory.tests.restart", "feature")) Feature(run=load("ldap.external_user_directory.tests.server_config", "feature")) Feature(run=load( "ldap.external_user_directory.tests.external_user_directory_config", "feature")) Feature(run=load("ldap.external_user_directory.tests.connections", "feature")) Feature(run=load("ldap.external_user_directory.tests.authentications", "feature")) Feature( run=load("ldap.external_user_directory.tests.roles", "feature"))
def regression(self, native): """ClickHouse Operator test regression suite. """ def run_features(): features = [ "e2e.test_metrics_exporter", "e2e.test_metrics_alerts", "e2e.test_zookeeper", "e2e.test_backup_alerts", "e2e.test_operator", "e2e.test_clickhouse", "e2e.test_examples", ] for feature_name in features: Feature(run=load(feature_name, "test")) self.context.native = native if native: run_features() else: with Cluster(): run_features()
def regression(self, local, clickhouse_binary_path, clickhouse_version=None, stress=None): """Extended precision data type regression.""" nodes = {"clickhouse": ("clickhouse1", )} if stress is not None: self.context.stress = stress self.context.clickhouse_version = clickhouse_version with Cluster( local, clickhouse_binary_path, nodes=nodes, docker_compose_project_dir=os.path.join( current_dir(), "extended-precision-data-type_env"), ) as cluster: self.context.cluster = cluster Feature( run=load("extended_precision_data_types.tests.feature", "feature"))
from helpers.inputHelper import InputHelper as IH from helpers.cluster import Cluster as Cluster import helpers.clientMessageHelper as um import helpers.dataHelper as dh import sys, time, urllib2 run_client = True # Run Client in Loop Until User Quits num_nodes = sys.argv[1] docker_image = sys.argv[2] print "Initializing Cluster..." cluster = Cluster(num_nodes, docker_image) ih = IH(cluster) while run_client: # Print Commands User Can Enter ih.print_user_options() # Handle User Response text = raw_input(">> ") tokens = text.split(" ") send = True msg = "" cmd = tokens[0] tokens = tokens[1:] try: