-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(lxd): Properly handle unicode from LXD socket #5309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functionally looks good.
I think we are missing correct mocks here in tests/unittests/sources/test_lxd.py::TestReadMetadata::test_read_metadata_handles_unexpected_content_or_http_status as we are failing on our mock here in py 3.11 due to our mocking of response.text instead of response.content. May need to update that unittest to avoid the 8 failures there.
Doh, I missed the unit test failures. Thanks! Should be updated now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bring it home!
@@ -506,6 +507,10 @@ def test_instance_cloud_id_across_reboot( | |||
assert client.execute(f"test -f /run/cloud-init/{cloud_file}").ok | |||
assert client.execute("test -f /run/cloud-init/cloud-id").ok | |||
|
|||
def test_unicode(self, class_client: IntegrationInstance): | |||
client = class_client | |||
assert "💩" == client.read_from_file("/var/tmp/unicode_data") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, who says we don't know how to have fun in this project?
Proposed Commit Message
Additional Context
See #5300
Merge type