aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCleber Rosa <crosa@redhat.com>2021-02-03 12:23:52 -0500
committerCleber Rosa <crosa@redhat.com>2021-02-15 22:28:15 -0500
commite8197c6e0c56aff83d96df221bb56a57d0bc0e96 (patch)
tree160f24cb22533865b44f7000cdc7f98ea7be4542 /tests
parentefe30d5011b7a667e3edac22ffd5318bc55c14b2 (diff)
downloadqemu-e8197c6e0c56aff83d96df221bb56a57d0bc0e96.zip
qemu-e8197c6e0c56aff83d96df221bb56a57d0bc0e96.tar.gz
qemu-e8197c6e0c56aff83d96df221bb56a57d0bc0e96.tar.bz2
Acceptance Tests: fix population of public key in cloudinit image
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/acceptance/avocado_qemu/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 687c5dc..51e9055 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -290,13 +290,15 @@ class LinuxTest(Test):
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