Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cloudinit/config/cc_puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def handle(name, cfg, cloud, log, _args):
cleaned_lines = [i.lstrip() for i in contents.splitlines()]
cleaned_contents = '\n'.join(cleaned_lines)
# Move to puppet_config.read_file when dropping py2.7
puppet_config.readfp( # pylint: disable=W1505
puppet_config.read_file(
StringIO(cleaned_contents),
filename=p_constants.conf_path)
source=p_constants.conf_path)
for (cfg_name, cfg) in puppet_cfg['conf'].items():
# Cert configuration is a special case
# Dump the puppet master ca certificate in the correct place
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_datasource/test_gce.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def test_connection(self):
self.assertTrue(success)

req_header = httpretty.last_request().headers
self.assertDictContainsSubset(HEADERS, req_header)
for header_name, expected_value in HEADERS.items():
self.assertEqual(expected_value, req_header.get(header_name))

def test_metadata(self):
# UnicodeDecodeError if set to ds.userdata instead of userdata_raw
Expand Down