summaryrefslogtreecommitdiff
path: root/tests/unittests
diff options
context:
space:
mode:
authorXiaofeng Wang <xiaofengw@vmware.com>2019-10-31 15:15:51 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-31 15:15:51 +0000
commita61ee02a50eb21954c114e01d2d042916bb2dc14 (patch)
tree35d5b3231afa524494cf1c34607e3685a519b705 /tests/unittests
parentd3e71b5e843edf73eb7da511a032d987e314bd69 (diff)
downloadvyos-cloud-init-a61ee02a50eb21954c114e01d2d042916bb2dc14.tar.gz
vyos-cloud-init-a61ee02a50eb21954c114e01d2d042916bb2dc14.zip
OVF: disable custom script execution by default
For security concern, we disable the custom script by default.If a custom script is provided, stop customization unless the custom script is explicitly enabled by tools config.
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/test_datasource/test_ovf.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unittests/test_datasource/test_ovf.py b/tests/unittests/test_datasource/test_ovf.py
index a615470a..a19c35c8 100644
--- a/tests/unittests/test_datasource/test_ovf.py
+++ b/tests/unittests/test_datasource/test_ovf.py
@@ -204,7 +204,7 @@ class TestDatasourceOVF(CiTestCase):
customscript = self.tmp_path('test-script', self.tdir)
util.write_file(customscript, "This is the post cust script")
- with mock.patch(MPATH + 'get_tools_config', return_value='false'):
+ with mock.patch(MPATH + 'get_tools_config', return_value='invalid'):
with mock.patch(MPATH + 'set_customization_status',
return_value=('msg', b'')):
with self.assertRaises(RuntimeError) as context: