summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/drivers/modules/test_ipxe.py
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2021-09-16 11:04:27 +1200
committerSteve Baker <sbaker@redhat.com>2021-12-10 15:44:50 +1300
commit00c0566185cf80e1f72a9cd3bcd5e72727a9a206 (patch)
tree506050960b5b4c9a2ab2f3857ff123d623e01f88 /ironic/tests/unit/drivers/modules/test_ipxe.py
parentcdc3b9538f3e874dc7d76a90b116ecef3a3603c7 (diff)
downloadironic-00c0566185cf80e1f72a9cd3bcd5e72727a9a206.tar.gz
Ensure desired permissions on all written pxe files
This change ensures all files written for pxe boot have permissions determined by the [pxe]file_permission config option. Change-Id: I1bc24e3871bae3ce070e7abe85fc4c48e844c317
Diffstat (limited to 'ironic/tests/unit/drivers/modules/test_ipxe.py')
-rw-r--r--ironic/tests/unit/drivers/modules/test_ipxe.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ironic/tests/unit/drivers/modules/test_ipxe.py b/ironic/tests/unit/drivers/modules/test_ipxe.py
index 2254a2c72..085c96c41 100644
--- a/ironic/tests/unit/drivers/modules/test_ipxe.py
+++ b/ironic/tests/unit/drivers/modules/test_ipxe.py
@@ -392,7 +392,7 @@ class iPXEBootTestCase(db_base.DbTestCase):
os.path.join(
CONF.deploy.http_root,
os.path.basename(CONF.pxe.ipxe_boot_script)),
- 'foo')
+ 'foo', 0o644)
render_mock.assert_called_once_with(
CONF.pxe.ipxe_boot_script,
{'ipxe_for_mac_uri': 'pxelinux.cfg/',
@@ -413,7 +413,7 @@ class iPXEBootTestCase(db_base.DbTestCase):
os.path.join(
CONF.deploy.http_root,
os.path.basename(CONF.pxe.ipxe_boot_script)),
- 'foo')
+ 'foo', 0o644)
render_mock.assert_called_once_with(
CONF.pxe.ipxe_boot_script,
{'ipxe_for_mac_uri': 'pxelinux.cfg/',
@@ -441,7 +441,7 @@ class iPXEBootTestCase(db_base.DbTestCase):
os.path.join(
CONF.deploy.http_root,
os.path.basename(CONF.pxe.ipxe_boot_script)),
- 'foo')
+ 'foo', 0o644)
@mock.patch.object(common_utils, 'render_template', lambda *args: 'foo')
@mock.patch('ironic.common.utils.write_to_file', autospec=True)
@@ -455,7 +455,7 @@ class iPXEBootTestCase(db_base.DbTestCase):
os.path.join(
CONF.deploy.http_root,
os.path.basename(CONF.pxe.ipxe_boot_script)),
- 'foo')
+ 'foo', 0o644)
def test_prepare_ramdisk_cleaning(self):
self.node.provision_state = states.CLEANING