mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
efe30d5011
commit
e8197c6e0c
|
@ -290,13 +290,15 @@ class LinuxTest(Test):
|
||||||
try:
|
try:
|
||||||
cloudinit_iso = os.path.join(self.workdir, 'cloudinit.iso')
|
cloudinit_iso = os.path.join(self.workdir, 'cloudinit.iso')
|
||||||
self.phone_home_port = network.find_free_port()
|
self.phone_home_port = network.find_free_port()
|
||||||
|
with open(ssh_pubkey) as pubkey:
|
||||||
|
pubkey_content = pubkey.read()
|
||||||
cloudinit.iso(cloudinit_iso, self.name,
|
cloudinit.iso(cloudinit_iso, self.name,
|
||||||
username='root',
|
username='root',
|
||||||
password='password',
|
password='password',
|
||||||
# QEMU's hard coded usermode router address
|
# QEMU's hard coded usermode router address
|
||||||
phone_home_host='10.0.2.2',
|
phone_home_host='10.0.2.2',
|
||||||
phone_home_port=self.phone_home_port,
|
phone_home_port=self.phone_home_port,
|
||||||
authorized_key=ssh_pubkey)
|
authorized_key=pubkey_content)
|
||||||
except Exception:
|
except Exception:
|
||||||
self.cancel('Failed to prepare the cloudinit image')
|
self.cancel('Failed to prepare the cloudinit image')
|
||||||
return cloudinit_iso
|
return cloudinit_iso
|
||||||
|
|
Loading…
Reference in New Issue