Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:Uyuni:Snapshots:2021.06
salt
fix-for-temp-folder-definition-in-loader-unit-t...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-for-temp-folder-definition-in-loader-unit-test.patch of Package salt
From 33766e59bd53fac2c75e6ccfa1f363e2f7b1b65f Mon Sep 17 00:00:00 2001 From: Jochen Breuer <jbreuer@suse.de> Date: Mon, 16 Mar 2020 15:25:42 +0100 Subject: [PATCH] Fix for temp folder definition in loader unit test --- tests/unit/test_loader.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_loader.py b/tests/unit/test_loader.py index 863e2182b9..5b23ad83e3 100644 --- a/tests/unit/test_loader.py +++ b/tests/unit/test_loader.py @@ -240,12 +240,12 @@ class LazyLoaderUtilsTest(TestCase): def setUpClass(cls): cls.opts = salt.config.minion_config(None) cls.opts["grains"] = salt.loader.grains(cls.opts) - if not os.path.isdir(TMP): - os.makedirs(TMP) + if not os.path.isdir(RUNTIME_VARS.TMP): + os.makedirs(RUNTIME_VARS.TMP) def setUp(self): # Setup the module - self.module_dir = tempfile.mkdtemp(dir=TMP) + self.module_dir = tempfile.mkdtemp(dir=RUNTIME_VARS.TMP) self.module_file = os.path.join( self.module_dir, "{}.py".format(self.module_name) ) @@ -254,7 +254,7 @@ class LazyLoaderUtilsTest(TestCase): fh.flush() os.fsync(fh.fileno()) - self.utils_dir = tempfile.mkdtemp(dir=TMP) + self.utils_dir = tempfile.mkdtemp(dir=RUNTIME_VARS.TMP) self.utils_file = os.path.join(self.utils_dir, "{}.py".format(self.utils_name)) with salt.utils.files.fopen(self.utils_file, "w") as fh: fh.write(salt.utils.stringutils.to_str(loader_template_utils)) -- 2.29.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor