with Then(f"I try to ALTER TTL"): alter_ttl_privilege_handler(permutation, table_name, user_name, node) finally: with Finally("I drop the user on a cluster"): node.query(f"DROP USER {user_name} ON CLUSTER sharded_cluster") @TestFeature @Requirements( RQ_SRS_006_RBAC_Privileges_AlterTTL("1.0"), RQ_SRS_006_RBAC_Privileges_AlterTTL_TableEngines("1.0"), RQ_SRS_006_RBAC_Privileges_All("1.0"), RQ_SRS_006_RBAC_Privileges_None("1.0") ) @Examples("table_type", [ (key,) for key in table_types.keys() ]) @Name("alter ttl") def feature(self, node="clickhouse1", stress=None, parallel=None): self.context.node = self.context.cluster.node(node) if parallel is not None: self.context.parallel = parallel if stress is not None: self.context.stress = stress for example in self.examples: table_type, = example if table_type != "MergeTree" and not self.context.stress: continue
with Then(f"I try to ALTER TTL"): alter_ttl_privilege_handler(permutation, table_name, user_name, node) finally: with Finally("I drop the user on a cluster"): node.query( f"DROP USER {user_name} ON CLUSTER sharded_cluster" ) @TestFeature @Requirements(RQ_SRS_006_RBAC_Privileges_AlterTTL("1.0"), RQ_SRS_006_RBAC_Privileges_AlterTTL_TableEngines("1.0"), RQ_SRS_006_RBAC_Privileges_All("1.0"), RQ_SRS_006_RBAC_Privileges_None("1.0")) @Examples("table_type", [(key, ) for key in table_types.keys()]) @Name("alter ttl") def feature(self, node="clickhouse1", stress=None, parallel=None): self.context.node = self.context.cluster.node(node) if parallel is not None: self.context.parallel = parallel if stress is not None: self.context.stress = stress for example in self.examples: table_type, = example if table_type != "MergeTree" and not self.context.stress: continue