cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #03335
Re: [Merge] ~powersj/cloud-init:cii-strings into cloud-init:master
Diff comments:
> diff --git a/tests/cloud_tests/instances/base.py b/tests/cloud_tests/instances/base.py
> index 959e9cc..af0d235 100644
> --- a/tests/cloud_tests/instances/base.py
> +++ b/tests/cloud_tests/instances/base.py
> @@ -31,6 +31,8 @@ class Instance(object):
> target filesystem being available at /.
>
> @param command: the command to execute as root inside the image
> + if command is a string, then it will be executed as:
> + ['bash', '-c', command]
While that makes sense, all the integration tests assume bash I was trying to be consistent with those and if that is a problem it should have been called out in the original merge. As a result, this only delays this merge further.
> @param stdout, stderr: file handles to write output and error to
> @param env: environment variables
> @param rcs: allowed return codes from command
> @@ -137,9 +139,8 @@ class Instance(object):
> tests.append(self.config['cloud_init_ready_script'])
>
> formatted_tests = ' && '.join(clean_test(t) for t in tests)
> - test_cmd = ('for ((i=0;i<{time};i++)); do {test} && exit 0; sleep 1; '
> - 'done; exit 1;').format(time=time, test=formatted_tests)
> - cmd = ['/bin/bash', '-c', test_cmd]
> + cmd = ('for ((i=0;i<{time};i++)); do {test} && exit 0; sleep 1; '
> + 'done; exit 1;').format(time=time, test=formatted_tests)
I would appreciate your fix, I do not have much experience with single line sh as my attempts to convert all failed. I believe not being able to figure it out is why Wes went with bash in the first place here.
>
> if self.execute(cmd, rcs=(0, 1))[-1] != 0:
> raise OSError('timeout: after {}s system not started'.format(time))
--
https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/330535
Your team cloud-init commiters is requested to review the proposed merge of ~powersj/cloud-init:cii-strings into cloud-init:master.
References