From 6aa7c0fafcca9c1493e6923ef68592ab68b286da Mon Sep 17 00:00:00 2001
From: Yatsishin Ilya <2159081+qoega@users.noreply.github.com>
Date: Tue, 11 May 2021 16:13:26 +0300
Subject: [PATCH] fixes
---
tests/integration/helpers/cluster.py | 2 ++
tests/integration/helpers/dictionary.py | 4 ++--
.../configs/dictionaries/ssd_complex_key_cache_string.xml | 2 +-
.../test_match_process_uid_against_data_owner/test.py | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py
index a4cfc0cdc4d..3de6defab4f 100644
--- a/tests/integration/helpers/cluster.py
+++ b/tests/integration/helpers/cluster.py
@@ -1854,6 +1854,7 @@ class ClickHouseInstance:
instance_config_dir = p.abspath(p.join(self.path, 'configs'))
os.makedirs(instance_config_dir)
+ os.chmod(instance_config_dir, stat.S_IRWXO)
logging.debug("Copy common default production configuration from {}".format(self.base_config_dir))
shutil.copyfile(p.join(self.base_config_dir, 'config.xml'), p.join(instance_config_dir, 'config.xml'))
@@ -1873,6 +1874,7 @@ class ClickHouseInstance:
dictionaries_dir = p.abspath(p.join(instance_config_dir, 'dictionaries'))
os.mkdir(dictionaries_dir)
+
logging.debug("Copy common configuration from helpers")
# The file is named with 0_ prefix to be processed before other configuration overloads.
shutil.copy(p.join(HELPERS_DIR, '0_common_instance_config.xml'), self.config_d_dir)
diff --git a/tests/integration/helpers/dictionary.py b/tests/integration/helpers/dictionary.py
index 41d87180c8a..b32b516d82c 100644
--- a/tests/integration/helpers/dictionary.py
+++ b/tests/integration/helpers/dictionary.py
@@ -7,12 +7,12 @@ class Layout(object):
'flat': '',
'hashed': '',
'cache': '128',
- 'ssd_cache': '/etc/clickhouse/dictionaries/all',
+ 'ssd_cache': '/etc/clickhouse-server/dictionaries/all',
'complex_key_hashed': '',
'complex_key_hashed_one_key': '',
'complex_key_hashed_two_keys': '',
'complex_key_cache': '128',
- 'complex_key_ssd_cache': '/etc/clickhouse/dictionaries/all',
+ 'complex_key_ssd_cache': '/etc/clickhouse-server/dictionaries/all',
'range_hashed': '',
'direct': '',
'complex_key_direct': ''
diff --git a/tests/integration/test_dictionaries_complex_key_cache_string/configs/dictionaries/ssd_complex_key_cache_string.xml b/tests/integration/test_dictionaries_complex_key_cache_string/configs/dictionaries/ssd_complex_key_cache_string.xml
index c8fdbcbe0ef..729dc11d0a1 100644
--- a/tests/integration/test_dictionaries_complex_key_cache_string/configs/dictionaries/ssd_complex_key_cache_string.xml
+++ b/tests/integration/test_dictionaries_complex_key_cache_string/configs/dictionaries/ssd_complex_key_cache_string.xml
@@ -41,7 +41,7 @@
16777216
131072
1048576
- /etc/clickhouse/dictionaries/radars
+ /etc/clickhouse-server/dictionaries/radars
1
diff --git a/tests/integration/test_match_process_uid_against_data_owner/test.py b/tests/integration/test_match_process_uid_against_data_owner/test.py
index 8adcc4463c9..754ebc731c1 100644
--- a/tests/integration/test_match_process_uid_against_data_owner/test.py
+++ b/tests/integration/test_match_process_uid_against_data_owner/test.py
@@ -31,7 +31,8 @@ def test_different_user():
with open(os.path.join(node.path, 'logs/clickhouse-server.err.log')) as log:
expected_message = "Effective user of the process \(.*\) does not match the owner of the data \(.*\)\. Run under 'sudo -u .*'\."
- last_messages = ";".join(log.readlines()[-2:-1])
+
+ last_message = [row for row in log.readlines() if "Effective" in row][-1]
if re.search(expected_message, last_message) is None:
pytest.fail(