[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 17/22] Acceptance Tests: fix population of public key in clou
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH 17/22] Acceptance Tests: fix population of public key in cloudinit image |
Date: |
Thu, 11 Feb 2021 14:08:49 +0400 |
On Wed, Feb 3, 2021 at 9:40 PM Cleber Rosa <crosa@redhat.com> wrote:
>
> Currently the path of the ssh public key is being set, but its
> content is obviously what's needed.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> tests/acceptance/avocado_qemu/__init__.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/acceptance/avocado_qemu/__init__.py
> b/tests/acceptance/avocado_qemu/__init__.py
> index 472088ae7d..8156224625 100644
> --- a/tests/acceptance/avocado_qemu/__init__.py
> +++ b/tests/acceptance/avocado_qemu/__init__.py
> @@ -337,13 +337,15 @@ class LinuxTest(Test, LinuxSSHMixIn):
> try:
> cloudinit_iso = os.path.join(self.workdir, 'cloudinit.iso')
> self.phone_home_port = network.find_free_port()
> + with open(ssh_pubkey) as pubkey:
> + pubkey_content = pubkey.read()
> cloudinit.iso(cloudinit_iso, self.name,
> username='root',
> password='password',
> # QEMU's hard coded usermode router address
> phone_home_host='10.0.2.2',
> phone_home_port=self.phone_home_port,
> - authorized_key=ssh_pubkey)
> + authorized_key=pubkey_content)
> except Exception:
> self.cancel('Failed to prepare the cloudinit image')
> return cloudinit_iso
> --
> 2.25.4
>
>
--
Marc-André Lureau
- [PATCH 09/22] tests/acceptance/virtiofs_submounts.py: required space between IP and port, (continued)
- [PATCH 09/22] tests/acceptance/virtiofs_submounts.py: required space between IP and port, Cleber Rosa, 2021/02/03
- [PATCH 10/22] Python: add utility function for retrieving port redirection, Cleber Rosa, 2021/02/03
- [PATCH 16/22] Acceptance Tests: introduce method for requiring an accelerator, Cleber Rosa, 2021/02/03
- [PATCH 17/22] Acceptance Tests: fix population of public key in cloudinit image, Cleber Rosa, 2021/02/03
- [PATCH 19/22] Acceptance Tests: add port redirection for ssh by default, Cleber Rosa, 2021/02/03
- [PATCH 20/22] Acceptance Tests: add basic documentation on LinuxTest base class, Cleber Rosa, 2021/02/03
- [PATCH 04/22] tests/acceptance/virtiofs_submounts.py: use workdir property, Cleber Rosa, 2021/02/03