Skip to content

Commit 1cb3f5b

Browse files
authored
Merge pull request #420 from stackhpc/upstream/master-2025-05-26
Synchronise master with upstream
2 parents c31e118 + ff37346 commit 1cb3f5b

File tree

3 files changed

+26
-150
lines changed

3 files changed

+26
-150
lines changed

.zuul.d/centos.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.zuul.d/rocky.yaml

Lines changed: 0 additions & 106 deletions
This file was deleted.

tests/test_set_config.py

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,32 @@ def test_load_ok(self):
4848
with mock.patch.object(set_configs, 'open', mo):
4949
config = set_configs.load_config()
5050
set_configs.copy_config(config)
51-
self.assertEqual([
52-
mock.call('/var/lib/kolla/config_files/config.json'),
53-
mock.call().__enter__(),
54-
mock.call().read(),
55-
mock.call().__exit__(None, None, None),
56-
mock.call('/run_command', 'w+'),
57-
mock.call().__enter__(),
58-
mock.call().write('/bin/true'),
59-
mock.call().__exit__(None, None, None)], mo.mock_calls)
51+
if sys.version_info >= (3, 13):
52+
calls = [
53+
mock.call('/var/lib/kolla/config_files/config.json'),
54+
mock.call().__enter__(),
55+
mock.call().read(),
56+
mock.call().__exit__(None, None, None),
57+
mock.call().close(),
58+
mock.call('/run_command', 'w+'),
59+
mock.call().__enter__(),
60+
mock.call().write('/bin/true'),
61+
mock.call().__exit__(None, None, None),
62+
mock.call().close()
63+
]
64+
else:
65+
calls = [
66+
mock.call('/var/lib/kolla/config_files/config.json'),
67+
mock.call().__enter__(),
68+
mock.call().read(),
69+
mock.call().__exit__(None, None, None),
70+
mock.call('/run_command', 'w+'),
71+
mock.call().__enter__(),
72+
mock.call().write('/bin/true'),
73+
mock.call().__exit__(None, None, None)
74+
]
75+
76+
self.assertEqual(calls, mo.mock_calls)
6077

6178

6279
FAKE_CONFIG_FILES = [

0 commit comments

Comments
 (0)