[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 8/9] Acceptance Tests: fix population of public key in cloudinit i
From: |
Cleber Rosa |
Subject: |
[PULL 8/9] Acceptance Tests: fix population of public key in cloudinit image |
Date: |
Mon, 15 Feb 2021 23:57:04 -0500 |
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>
Message-Id: <20210203172357.1422425-18-crosa@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@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 687c5dc0cf6..51e9055c986 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -290,13 +290,15 @@ def prepare_cloudinit(self, ssh_pubkey=None):
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.26.2
- [PULL 0/9] Acceptance Tests and Python libs patches for 2021-02-15, Cleber Rosa, 2021/02/15
- [PULL 2/9] virtiofs_submounts.py test: Note on vmlinuz param, Cleber Rosa, 2021/02/15
- [PULL 1/9] Acceptance Tests: bump Avocado version requirement to 85.0, Cleber Rosa, 2021/02/15
- [PULL 3/9] Python: close the log file kept by QEMUMachine before reading it, Cleber Rosa, 2021/02/15
- [PULL 5/9] maint: Tell git that *.py files should use python diff hunks, Cleber Rosa, 2021/02/15
- [PULL 4/9] tests/acceptance/virtio-gpu.py: preserve virtio-user-gpu log, Cleber Rosa, 2021/02/15
- [PULL 6/9] Acceptance Tests: introduce LinuxTest base class, Cleber Rosa, 2021/02/15
- [PULL 7/9] Acceptance Tests: introduce method for requiring an accelerator, Cleber Rosa, 2021/02/15
- [PULL 8/9] Acceptance Tests: fix population of public key in cloudinit image,
Cleber Rosa <=
- [PULL 9/9] Acceptance Tests: set up existing ssh keys by default, Cleber Rosa, 2021/02/15
- Re: [PULL 0/9] Acceptance Tests and Python libs patches for 2021-02-15, Peter Maydell, 2021/02/16