diff options
author | Олег <150132506+iddqdex@users.noreply.github.com> | 2025-05-27 20:44:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-27 17:44:36 +0000 |
commit | 776fa2a5631954c69e8fd6899e1d5a62c183affe (patch) | |
tree | 3347f55c11edc395417ff081f52c250d213cac64 | |
parent | 5e8a1fbf654f549ccd6c061d35c24bd9be0897d8 (diff) | |
download | ydb-776fa2a5631954c69e8fd6899e1d5a62c183affe.tar.gz |
Fix tests with secert queries (#18918)
-rw-r--r-- | ydb/tests/olap/lib/allure_utils.py | 6 | ||||
-rw-r--r-- | ydb/tests/olap/lib/ydb_cli.py | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/ydb/tests/olap/lib/allure_utils.py b/ydb/tests/olap/lib/allure_utils.py index 6fa22d09708..f0dd867e7c4 100644 --- a/ydb/tests/olap/lib/allure_utils.py +++ b/ydb/tests/olap/lib/allure_utils.py @@ -141,9 +141,9 @@ def allure_test_description( } ) table_strings = '\n'.join([f'<tr><td>{_pretty_str(k)}</td><td>{v}</td></tr>' for k, v in test_info.items()]) - allure.dynamic.description_html( - f'''<table border='1' cellpadding='4px'><tbody> + html = f'''<table border='1' cellpadding='4px'><tbody> {table_strings} </tbody></table> ''' - ) + allure.dynamic.description_html(html) + allure.attach(html, "description.html", allure.attachment_type.HTML) diff --git a/ydb/tests/olap/lib/ydb_cli.py b/ydb/tests/olap/lib/ydb_cli.py index 6e888f716e8..02b44ffa4e8 100644 --- a/ydb/tests/olap/lib/ydb_cli.py +++ b/ydb/tests/olap/lib/ydb_cli.py @@ -160,10 +160,10 @@ class YdbCliHelper: self.returncode = None self.stderr = None self.stdout = None - prefix = md5(','.join(query_names).encode()).hexdigest() if len(query_names) != 1 else [q for q in query_names][0] - self.__plan_path = f'{prefix}.plan' - self.__query_output_path = f'{prefix}.result' - self.json_path = f'{prefix}.stats.json' + self.__prefix = md5(','.join(query_names).encode()).hexdigest() if len(query_names) != 1 else [q for q in query_names][0] + self.__plan_path = f'{self.__prefix}.plan' + self.__query_output_path = f'{self.__prefix}.result' + self.json_path = f'{self.__prefix}.stats.json' def get_plan_path(self, query_name: str, plan_name: Any) -> str: return f'{self.__plan_path}.{query_name}.{plan_name}' @@ -204,11 +204,11 @@ class YdbCliHelper: try: if not self.result.add_error(YdbCluster.wait_ydb_alive(int(os.getenv('WAIT_CLUSTER_ALIVE_TIMEOUT', 20 * 60)), self.db_path)): if os.getenv('SECRET_REQUESTS', '') == '1': - with open(f'{self.query_name}.stdout', "wt") as sout, open(f'{self.query_name}.stderr', "wt") as serr: + with open(f'{self.__prefix}.stdout', "wt") as sout, open(f'{self.__prefix}.stderr', "wt") as serr: cmd = self.__get_cmd() logging.info(f'Run ydb cli: {cmd}') process = subprocess.run(cmd, check=False, text=True, stdout=sout, stderr=serr) - with open(f'{self.query_name}.stdout', "rt") as sout, open(f'{self.query_name}.stderr', "rt") as serr: + with open(f'{self.__prefix}.stdout', "rt") as sout, open(f'{self.__prefix}.stderr', "rt") as serr: self.stderr = serr.read() self.stdout = sout.read() else: |