You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/tests/test_query.py", line 153, in test_handle_args_dumps_all_instance_data
self.assertEqual(0, query.handle_args('anyname', args))
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/query.py", line 124, in handle_args
instance_data['userdata'] = util.load_file(user_data_fn)
File "/home/anhvo/repos/cloud-init/cloudinit/util.py", line 1359, in load_file
with open(fname, 'rb') as ifh:
FileNotFoundError: [Errno 2] No such file or directory: 'ud'
Traceback (most recent call last):
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/tests/test_query.py", line 255, in test_handle_args_list_keys_errors_when_varname_is_not_a_dict
self.assertEqual(1, query.handle_args('anyname', args))
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/query.py", line 124, in handle_args
instance_data['userdata'] = util.load_file(user_data_fn)
File "/home/anhvo/repos/cloud-init/cloudinit/util.py", line 1359, in load_file
with open(fname, 'rb') as ifh:
FileNotFoundError: [Errno 2] No such file or directory: 'ud'
The text was updated successfully, but these errors were encountered:
Launchpad user Brett Holman(holmanb) wrote on 2022-02-15T21:54:15.976730+00:00
This bug is believed to be fixed in cloud-init in version 22.1. If this is still a problem for you, please make a comment and set the state back to New
This bug was originally filed in Launchpad as LP: #1825027
Launchpad details
Launchpad user Anh Vo (MSFT)(vtqanh) wrote on 2019-04-16T17:40:17.955388+00:00
The tests under cloudinit/cmd/tests/test_query.py will fail if run as root.
sudo nosetests3 test_query.py --debug=query
query: WARNING: Missing root-readable /tmp/ci-TestQuery.0ztjrur1/run_dir/instance-data-sensitive.json. Using redacted /tmp/ci-TestQuery.0ztjrur1/run_dir/instance-data.json instead.
query: ERROR: Missing instance-data file: /tmp/ci-TestQuery.0ztjrur1/run_dir/instance-data.json
.Equery: ERROR: Missing instance-data file: /tmp/ci-TestQuery.2_qzzunv/absent
.query: ERROR: Expected one of the options: --all, --format, --list-keys or varname
.query: ERROR: No read permission on '/tmp/ci-TestQuery.faxmaofy/unreadable'. Try sudo
.EEEEEEquery: WARNING: Missing root-readable /tmp/ci-TestQuery.rhy7l_rq/run_dir/instance-data-sensitive.json. Using redacted /tmp/ci-TestQuery.rhy7l_rq/run_dir/instance-data.json instead.
query: ERROR: Missing instance-data file: /tmp/ci-TestQuery.rhy7l_rq/run_dir/instance-data.json
..
ERROR: cloudinit.cmd.tests.test_query.TestQuery.test_handle_args_dumps_all_instance_data
Traceback (most recent call last):
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/tests/test_query.py", line 153, in test_handle_args_dumps_all_instance_data
self.assertEqual(0, query.handle_args('anyname', args))
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/query.py", line 124, in handle_args
instance_data['userdata'] = util.load_file(user_data_fn)
File "/home/anhvo/repos/cloud-init/cloudinit/util.py", line 1359, in load_file
with open(fname, 'rb') as ifh:
FileNotFoundError: [Errno 2] No such file or directory: 'ud'
======================================================================
ERROR: cloudinit.cmd.tests.test_query.TestQuery.test_handle_args_list_keys_errors_when_varname_is_not_a_dict
Traceback (most recent call last):
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/tests/test_query.py", line 255, in test_handle_args_list_keys_errors_when_varname_is_not_a_dict
self.assertEqual(1, query.handle_args('anyname', args))
File "/home/anhvo/repos/cloud-init/cloudinit/cmd/query.py", line 124, in handle_args
instance_data['userdata'] = util.load_file(user_data_fn)
File "/home/anhvo/repos/cloud-init/cloudinit/util.py", line 1359, in load_file
with open(fname, 'rb') as ifh:
FileNotFoundError: [Errno 2] No such file or directory: 'ud'
The text was updated successfully, but these errors were encountered: