Skip to content

Commit

Permalink
tests/acceptance: linux-related tests fix
Browse files Browse the repository at this point in the history
This patch allows cloudinit images download when ssh
key is not specified.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <161373266228.1608713.7614311331725780044.stgit@pasha-ThinkPad-X280>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
  • Loading branch information
Dovgalyuk authored and clebergnu committed Mar 17, 2021
1 parent 9afa176 commit affc55e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/acceptance/avocado_qemu/__init__.py
Expand Up @@ -317,8 +317,10 @@ 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()
pubkey_content = None
if ssh_pubkey:
with open(ssh_pubkey) as pubkey:
pubkey_content = pubkey.read()
cloudinit.iso(cloudinit_iso, self.name,
username='root',
password='password',
Expand Down

0 comments on commit affc55e

Please sign in to comment.