Skip to content

Instantly share code, notes, and snippets.

@pquerna
Created August 6, 2014 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pquerna/116d43838844cce47304 to your computer and use it in GitHub Desktop.
Save pquerna/116d43838844cce47304 to your computer and use it in GitHub Desktop.
(.venc)[root@pq-cloud-init-dev cloud-init]# make test pylint pep8
Running tests...
...................................................................................................................................................................F................................................................................................................E...........................................................
======================================================================
ERROR: test_write_hostname_rhel (tests.unittests.test_handler.test_handler_set_hostname.TestHostname)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/cloud-init/.venc/lib/python2.7/site-packages/mocker.py", line 149, in test_method_wrapper
result = test_method()
File "/root/cloud-init/tests/unittests/test_handler/test_handler_set_hostname.py", line 40, in test_write_hostname_rhel
contents = util.load_file("/etc/sysconfig/network")
File "/root/cloud-init/tests/unittests/helpers.py", line 120, in wrapper
return old_func(*n_args, **kwds)
File "/root/cloud-init/cloudinit/util.py", line 1081, in load_file
with open(fname, 'rb') as ifh:
IOError: [Errno 2] No such file or directory: '/tmp/unittest_xAXjnl/etc/sysconfig/network'
-------------------- >> begin captured logging << --------------------
cloudinit.importer: DEBUG: Failed at attempted import of 'rhel' due to: No module named rhel
tests.unittests.test_handler.test_handler_set_hostname: DEBUG: Setting the hostname to blah.blah.blah.yahoo.com (blah)
cloudinit.distros: DEBUG: Non-persistently setting the system hostname to blah
cloudinit.util: DEBUG: Reading from /tmp/unittest_xAXjnl/etc/sysconfig/network (quiet=False)
--------------------- >> end captured logging << ---------------------
======================================================================
FAIL: test_scripts_shebanged (tests.unittests.test_datasource.test_smartos.TestSmartOSDataSource)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/root/cloud-init/.venc/lib/python2.7/site-packages/mocker.py", line 149, in test_method_wrapper
result = test_method()
File "/root/cloud-init/tests/unittests/test_datasource/test_smartos.py", line 312, in test_scripts_shebanged
self.assertEquals(shebang, "#!/bin/bash")
AssertionError: '/bin/true' != '#!/bin/bash'
-------------------- >> begin captured logging << --------------------
cloudinit.util: DEBUG: Writing to /tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script - wb: [448] 10 bytes
cloudinit.util: DEBUG: Running command ['file', '--brief', '--mime-type', '/tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script'] with allowed return codes [0] (shell=False, capture=True)
cloudinit.sources.DataSourceSmartOS: WARNING: ('Failed to identify script type for /tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script', ProcessExecutionError("Unexpected error while running command.\nCommand: ['file', '--brief', '--mime-type', '/tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script']\nExit code: -\nReason: [Errno 2] No such file or directory\nStdout: ''\nStderr: ''",))
cloudinit.sources.DataSourceSmartOS: DEBUG: ('Failed to identify script type for /tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script', ProcessExecutionError("Unexpected error while running command.\nCommand: ['file', '--brief', '--mime-type', '/tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script']\nExit code: -\nReason: [Errno 2] No such file or directory\nStdout: ''\nStderr: ''",))
Traceback (most recent call last):
File "/root/cloud-init/cloudinit/sources/DataSourceSmartOS.py", line 417, in write_boot_content
(f_type, _err) = util.subp(cmd)
File "/root/cloud-init/cloudinit/util.py", line 1534, in subp
raise ProcessExecutionError(cmd=args, reason=e)
ProcessExecutionError: Unexpected error while running command.
Command: ['file', '--brief', '--mime-type', '/tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/user-script']
Exit code: -
Reason: [Errno 2] No such file or directory
Stdout: ''
Stderr: ''
cloudinit.util: DEBUG: Writing to /tmp/tmpk2A311/instances/807499b4-7c39-46c5-95f1-488b952f1a2c/data/operator-script - wb: [448] 9 bytes
cloudinit.util: DEBUG: Writing to /tmp/tmp22WrTM/mdata-user-data - wb: [256] 10 bytes
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 336 tests in 3.801s
FAILED (errors=1, failures=1)
make: *** [test] Error 1
(.venc)[root@pq-cloud-init-dev cloud-init]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment