[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/5] tests/acceptance: linux-related tests fix
From: |
Cleber Rosa |
Subject: |
[PULL 5/5] tests/acceptance: linux-related tests fix |
Date: |
Tue, 16 Mar 2021 23:52:42 -0400 |
From: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
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>
---
tests/acceptance/avocado_qemu/__init__.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/acceptance/avocado_qemu/__init__.py
b/tests/acceptance/avocado_qemu/__init__.py
index ac8041821fa..83b1741ec85 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -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',
--
2.30.2
- [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16, Cleber Rosa, 2021/03/16
- [PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern, Cleber Rosa, 2021/03/16
- [PULL 2/5] tests/migration: fix unix socket batch migration, Cleber Rosa, 2021/03/16
- [PULL 3/5] avocado_qemu: add exec_command function, Cleber Rosa, 2021/03/16
- [PULL 4/5] tests: Add functional test for out-of-process device emulation, Cleber Rosa, 2021/03/16
- [PULL 5/5] tests/acceptance: linux-related tests fix,
Cleber Rosa <=
- Re: [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16, Peter Maydell, 2021/03/18