From 5b1da017988c987fc68b55d1f45b5d2676474ce1 Mon Sep 17 00:00:00 2001 From: Radosław Piliszek Date: Mon, 29 Aug 2022 09:55:59 +0000 Subject: Fix CVE-2022-38060 Closes-Bug: #1985784 Change-Id: I66476a2b396e2cbe41e68ac51f57aae1806b2ed8 --- tests/test_set_config.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'tests') diff --git a/tests/test_set_config.py b/tests/test_set_config.py index ca3a6bb95..e74376c60 100644 --- a/tests/test_set_config.py +++ b/tests/test_set_config.py @@ -59,24 +59,6 @@ class LoadFromFile(base.BaseTestCase): mock.call().__exit__(None, None, None)], mo.mock_calls) -class LoadFromEnv(base.BaseTestCase): - - def test_load_ok(self): - in_config = json.dumps({'command': '/bin/true', - 'config_files': {}}) - - mo = mock.mock_open() - with mock.patch.object(set_configs, 'open', mo): - with mock.patch.dict('os.environ', {'KOLLA_CONFIG': in_config}): - config = set_configs.load_config() - set_configs.copy_config(config) - self.assertEqual([mock.call('/run_command', 'w+'), - mock.call().__enter__(), - mock.call().write('/bin/true'), - mock.call().__exit__(None, None, None)], - mo.mock_calls) - - FAKE_CONFIG_FILES = [ set_configs.ConfigFile( '/var/lib/kolla/config_files/bar.conf', -- cgit v1.2.3