diff options
author | Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> | 2021-02-19 14:04:22 +0300 |
---|---|---|
committer | Cleber Rosa <crosa@redhat.com> | 2021-03-16 22:24:44 -0400 |
commit | affc55e761ea4c96b9b2de582d813787a317aeda (patch) | |
tree | ad2a2d54d501fbc700f21005af5f1a0932330a37 /tests | |
parent | 9afa1766dd48203d7fe27c88b16ef755361b5b78 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/avocado_qemu/__init__.py | 6 |
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', |