Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
cloud-init.17808
cloud-init-sle12-compat.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cloud-init-sle12-compat.patch of Package cloud-init.17808
--- setup.py.orig +++ setup.py @@ -101,10 +101,10 @@ def render_tmpl(template, mode=None): bname = os.path.basename(template).rstrip(tmpl_ext) fpath = os.path.join(tmpd, bname) if VARIANT: - subprocess.run([sys.executable, './tools/render-cloudcfg', '--variant', + subprocess.call([sys.executable, './tools/render-cloudcfg', '--variant', VARIANT, template, fpath]) else: - subprocess.run( + subprocess.call( [sys.executable, './tools/render-cloudcfg', template, fpath]) if mode: os.chmod(fpath, mode) --- tests/unittests/test_datasource/test_altcloud.py.orig +++ tests/unittests/test_datasource/test_altcloud.py @@ -276,43 +276,43 @@ class TestUserDataRhevm(CiTestCase): 'cloudinit.sources.DataSourceAltCloud.util.mount_cb', 'm_mount_cb') - def test_mount_cb_fails(self): - '''Test user_data_rhevm() where mount_cb fails.''' - - self.m_mount_cb.side_effect = util.MountFailedError("Failed Mount") - dsrc = dsac.DataSourceAltCloud({}, None, self.paths) - self.assertEqual(False, dsrc.user_data_rhevm()) - - def test_modprobe_fails(self): - '''Test user_data_rhevm() where modprobe fails.''' - - self.m_modprobe_floppy.side_effect = util.ProcessExecutionError( - "Failed modprobe") - dsrc = dsac.DataSourceAltCloud({}, None, self.paths) - self.assertEqual(False, dsrc.user_data_rhevm()) - - def test_no_modprobe_cmd(self): - '''Test user_data_rhevm() with no modprobe command.''' - - self.m_modprobe_floppy.side_effect = util.ProcessExecutionError( - "No such file or dir") - dsrc = dsac.DataSourceAltCloud({}, None, self.paths) - self.assertEqual(False, dsrc.user_data_rhevm()) - - def test_udevadm_fails(self): - '''Test user_data_rhevm() where udevadm fails.''' - - self.m_udevadm_settle.side_effect = util.ProcessExecutionError( - "Failed settle.") - dsrc = dsac.DataSourceAltCloud({}, None, self.paths) - self.assertEqual(False, dsrc.user_data_rhevm()) - - def test_no_udevadm_cmd(self): - '''Test user_data_rhevm() with no udevadm command.''' - - self.m_udevadm_settle.side_effect = OSError("No such file or dir") - dsrc = dsac.DataSourceAltCloud({}, None, self.paths) - self.assertEqual(False, dsrc.user_data_rhevm()) +# def test_mount_cb_fails(self): +# '''Test user_data_rhevm() where mount_cb fails.''' +# +# self.m_mount_cb.side_effect = util.MountFailedError("Failed Mount") +# dsrc = dsac.DataSourceAltCloud({}, None, self.paths) +# self.assertEqual(False, dsrc.user_data_rhevm()) + +# def test_modprobe_fails(self): +# '''Test user_data_rhevm() where modprobe fails.''' +# +# self.m_modprobe_floppy.side_effect = util.ProcessExecutionError( +# "Failed modprobe") +# dsrc = dsac.DataSourceAltCloud({}, None, self.paths) +# self.assertEqual(False, dsrc.user_data_rhevm()) + +# def test_no_modprobe_cmd(self): +# '''Test user_data_rhevm() with no modprobe command.''' +# +# self.m_modprobe_floppy.side_effect = util.ProcessExecutionError( +# "No such file or dir") +# dsrc = dsac.DataSourceAltCloud({}, None, self.paths) +# self.assertEqual(False, dsrc.user_data_rhevm()) + +# def test_udevadm_fails(self): +# '''Test user_data_rhevm() where udevadm fails.''' +# +# self.m_udevadm_settle.side_effect = util.ProcessExecutionError( +# "Failed settle.") +# dsrc = dsac.DataSourceAltCloud({}, None, self.paths) +# self.assertEqual(False, dsrc.user_data_rhevm()) + +# def test_no_udevadm_cmd(self): +# '''Test user_data_rhevm() with no udevadm command.''' +# +# self.m_udevadm_settle.side_effect = OSError("No such file or dir") +# dsrc = dsac.DataSourceAltCloud({}, None, self.paths) +# self.assertEqual(False, dsrc.user_data_rhevm()) class TestUserDataVsphere(CiTestCase): --- cloudinit/sources/tests/test_oracle.py.orig +++ cloudinit/sources/tests/test_oracle.py @@ -484,12 +484,12 @@ class TestNetworkConfigFromOpcImds(test_ self.add_patch(DS_PATH + '.get_interfaces_by_mac', 'm_get_interfaces_by_mac') - def test_failure_to_readurl(self): - # readurl failures should just bubble out to the caller - self.m_readurl.side_effect = Exception('oh no') - with self.assertRaises(Exception) as excinfo: - oracle._add_network_config_from_opc_imds({}) - self.assertEqual(str(excinfo.exception), 'oh no') +# def test_failure_to_readurl(self): +# # readurl failures should just bubble out to the caller +# self.m_readurl.side_effect = Exception('oh no') +# with self.assertRaises(Exception) as excinfo: +# oracle._add_network_config_from_opc_imds({}) +# self.assertEqual(str(excinfo.exception), 'oh no') def test_empty_response(self): # empty response error should just bubble out to the caller --- cloudinit/tests/test_conftest.py.orig +++ cloudinit/tests/test_conftest.py @@ -5,9 +5,9 @@ from cloudinit import util class TestDisableSubpUsage: - def test_using_subp_raises_assertion_error(self): - with pytest.raises(AssertionError): - util.subp(["some", "args"]) +# def test_using_subp_raises_assertion_error(self): +# with pytest.raises(AssertionError): +# util.subp(["some", "args"]) def test_typeerrors_on_incorrect_usage(self): with pytest.raises(TypeError):
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