From: Cleber Rosa <crosa@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Pavel Dovgalyuk" <Pavel.Dovgalyuk@ispras.ru>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"John Snow" <jsnow@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Willian Rampazzo" <willianr@redhat.com>,
"Willian Rampazzo" <wrampazz@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>
Subject: [PULL 5/5] tests/acceptance: linux-related tests fix
Date: Tue, 16 Mar 2021 23:52:42 -0400 [thread overview]
Message-ID: <20210317035242.24418-6-crosa@redhat.com> (raw)
In-Reply-To: <20210317035242.24418-1-crosa@redhat.com>
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
next prev parent reply other threads:[~2021-03-17 3:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 3:52 [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16 Cleber Rosa
2021-03-17 3:52 ` [PULL 1/5] tests/acceptance: Print expected message on wait_for_console_pattern Cleber Rosa
2021-03-17 3:52 ` [PULL 2/5] tests/migration: fix unix socket batch migration Cleber Rosa
2021-03-17 3:52 ` [PULL 3/5] avocado_qemu: add exec_command function Cleber Rosa
2021-03-17 3:52 ` [PULL 4/5] tests: Add functional test for out-of-process device emulation Cleber Rosa
2021-03-17 3:52 ` Cleber Rosa [this message]
2021-03-18 14:57 ` [PULL 0/5] Acceptance Tests and Python libs patches for 2021-03-16 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210317035242.24418-6-crosa@redhat.com \
--to=crosa@redhat.com \
--cc=Pavel.Dovgalyuk@ispras.ru \
--cc=bleal@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@redhat.com \
--cc=willianr@redhat.com \
--cc=wrampazz@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).