summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Dovgalyuk2021-02-19 12:04:22 +0100
committerCleber Rosa2021-03-17 03:24:44 +0100
commitaffc55e761ea4c96b9b2de582d813787a317aeda (patch)
treead2a2d54d501fbc700f21005af5f1a0932330a37
parenttests: Add functional test for out-of-process device emulation (diff)
downloadqemu-affc55e761ea4c96b9b2de582d813787a317aeda.tar.gz
qemu-affc55e761ea4c96b9b2de582d813787a317aeda.tar.xz
qemu-affc55e761ea4c96b9b2de582d813787a317aeda.zip
tests/acceptance: linux-related tests fix
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>
-rw-r--r--tests/acceptance/avocado_qemu/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index ac8041821f..83b1741ec8 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -317,8 +317,10 @@ 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()
+ 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',