cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #04073
Re: [Merge] ~smoser/cloud-init:cleanup/ec2-console-as-bytes into cloud-init:master
Diff comments:
> diff --git a/tests/cloud_tests/platforms/ec2/instance.py b/tests/cloud_tests/platforms/ec2/instance.py
> index 4ba737a..9a7d303 100644
> --- a/tests/cloud_tests/platforms/ec2/instance.py
> +++ b/tests/cloud_tests/platforms/ec2/instance.py
> @@ -46,9 +46,16 @@ class EC2Instance(Instance):
> may return empty string.
> """
> try:
> - return self.instance.console_output()['Output'].encode()
> + # OutputBytes comes from platform._decode_console_output_as_bytes
> + response = self.instance.console_output()
> + return response['OutputBytes']
> except KeyError:
> - return b''
> + if 'Output' in response:
> + raise util.PlatformError(
> + 'console_log',
> + "'OutputBytes' did not exist in console_output(), "
> + "but 'Output' did: %s", response['Output'])
The , response doesn't look right PlatformError takes 2 things, not 3:
2018-01-19 19:26:32,961 - tests.cloud_tests - ERROR - stage: collect test data for xenial encountered error: __init__() takes from 2 to 3 positional arguments but 4 were given
> + return ('No Console Output [%s]' % self.instance).encode()
>
> def destroy(self):
> """Clean up instance."""
--
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/336366
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:cleanup/ec2-console-as-bytes into cloud-init:master.
References