From 4b87ae684c25e9c59b8ef147b4d79195574f73a5 Mon Sep 17 00:00:00 2001 From: Vitaliy Zakaznikov Date: Fri, 7 May 2021 15:40:58 -0400 Subject: [PATCH] Adding 'clean' script to clean up _instances folders. Updating RBAC to run on the latest master. Fixing ldap SRS reference issue. --- tests/testflows/clean | 9 +++++++++ tests/testflows/map_type/regression.py | 5 +++++ tests/testflows/rbac/regression.py | 6 ++++++ .../rbac/tests/privileges/attach/attach_dictionary.py | 4 ++-- tests/testflows/regression.py | 11 +++++++---- tests/testflows/window_functions/regression.py | 5 +++++ 6 files changed, 34 insertions(+), 6 deletions(-) create mode 100755 tests/testflows/clean diff --git a/tests/testflows/clean b/tests/testflows/clean new file mode 100755 index 00000000000..6d424343d04 --- /dev/null +++ b/tests/testflows/clean @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Clean up all the _instances folders where +# ClickHouse services store their data. +# +# Note: needs root privilege because Docker mounts +# these folders into containers. +# +find . -type d -name _instances | sudo xargs rm -rf diff --git a/tests/testflows/map_type/regression.py b/tests/testflows/map_type/regression.py index f32cde76edf..cd72bdf75fd 100755 --- a/tests/testflows/map_type/regression.py +++ b/tests/testflows/map_type/regression.py @@ -111,6 +111,11 @@ def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): ("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(), "map_type_env")) as cluster: self.context.cluster = cluster diff --git a/tests/testflows/rbac/regression.py b/tests/testflows/rbac/regression.py index c28173efe43..6cb541b4c70 100755 --- a/tests/testflows/rbac/regression.py +++ b/tests/testflows/rbac/regression.py @@ -138,6 +138,12 @@ xfails = { [(Fail, issue_21083)], "privileges/: row policy/nested mat:": [(Fail, issue_21084)], + "privileges/show dictionaries/:/check privilege/check privilege=SHOW DICTIONARIES/show dict/SHOW DICTIONARIES with privilege": + [(Fail, "new bug")], + "privileges/show dictionaries/:/check privilege/check privilege=CREATE DICTIONARY/show dict/SHOW DICTIONARIES with privilege": + [(Fail, "new bug")], + "privileges/show dictionaries/:/check privilege/check privilege=DROP DICTIONARY/show dict/SHOW DICTIONARIES with privilege": + [(Fail, "new bug")], } xflags = { diff --git a/tests/testflows/rbac/tests/privileges/attach/attach_dictionary.py b/tests/testflows/rbac/tests/privileges/attach/attach_dictionary.py index 390a7f03aba..fbebdc0003d 100644 --- a/tests/testflows/rbac/tests/privileges/attach/attach_dictionary.py +++ b/tests/testflows/rbac/tests/privileges/attach/attach_dictionary.py @@ -59,7 +59,7 @@ def privilege_check(grant_target_name, user_name, node=None): with Then("I attempt to attach a dictionary"): node.query(f"ATTACH DICTIONARY {dict_name}", settings = [("user", user_name)], - exitcode=231, message=f"DB::Exception: Dictionary `{dict_name}` doesn't exist.") + exitcode=134, message=f"DB::Exception: Table `{dict_name}` doesn't exist.") finally: with Finally("I drop the dictionary"): @@ -110,7 +110,7 @@ def privilege_check(grant_target_name, user_name, node=None): with Then("I attempt to attach a dictionary"): node.query(f"ATTACH DICTIONARY {dict_name}", settings = [("user", user_name)], - exitcode=231, message=f"DB::Exception: Dictionary `{dict_name}` doesn't exist.") + exitcode=134, message=f"DB::Exception: Table `{dict_name}` doesn't exist.") finally: with Finally("I drop the dictionary"): diff --git a/tests/testflows/regression.py b/tests/testflows/regression.py index f08f025f109..b27366df417 100755 --- a/tests/testflows/regression.py +++ b/tests/testflows/regression.py @@ -16,13 +16,16 @@ def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): top().terminating = False args = {"local": local, "clickhouse_binary_path": clickhouse_binary_path, "stress": stress, "parallel": parallel} + self.context.stress = stress + self.context.parallel = parallel + tasks = [] with Pool(7) as pool: try: - # run_scenario(pool, tasks, Feature(test=load("example.regression", "regression")), args) - # run_scenario(pool, tasks, Feature(test=load("ldap.regression", "regression")), args) - # run_scenario(pool, tasks, Feature(test=load("rbac.regression", "regression")), args) - # run_scenario(pool, tasks, Feature(test=load("aes_encryption.regression", "regression")), args) + run_scenario(pool, tasks, Feature(test=load("example.regression", "regression")), args) + run_scenario(pool, tasks, Feature(test=load("ldap.regression", "regression")), args) + run_scenario(pool, tasks, Feature(test=load("rbac.regression", "regression")), args) + run_scenario(pool, tasks, Feature(test=load("aes_encryption.regression", "regression")), args) run_scenario(pool, tasks, Feature(test=load("map_type.regression", "regression")), args) run_scenario(pool, tasks, Feature(test=load("window_functions.regression", "regression")), args) # run_scenario(pool, tasks, Feature(test=load("kerberos.regression", "regression")), args) diff --git a/tests/testflows/window_functions/regression.py b/tests/testflows/window_functions/regression.py index a27040357c6..fed9b723221 100755 --- a/tests/testflows/window_functions/regression.py +++ b/tests/testflows/window_functions/regression.py @@ -86,6 +86,11 @@ def regression(self, local, clickhouse_binary_path, stress=None, parallel=None): ("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(), "window_functions_env")) as cluster: self.context.cluster = cluster