integ: download plugin packages before running the tests

This patch is going to avoid connectivity issues during the package
installation when running tests.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
This commit is contained in:
Fernando Fernandez Mancera 2020-01-31 12:19:50 +01:00 committed by Till Maas
parent 62c6d35175
commit cfe7061ee3
2 changed files with 17 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# Copyright (c) 2018-2020 Red Hat, Inc.
#
# This file is part of nmstate
#
@ -102,7 +102,14 @@ def _get_osname():
@pytest.fixture(scope="session", autouse=True)
def download_nm_team_plugin():
def download_packages():
cmdlib.exec_cmd(
("dnf", "install", "-y", "--downloadonly", "NetworkManager-team",)
(
"dnf",
"install",
"-y",
"--downloadonly",
"NetworkManager-ovs",
"NetworkManager-team",
)
)

View File

@ -40,7 +40,13 @@ PORT1 = "ovs1"
VLAN_IFNAME = "eth101"
DNF_REMOVE_NM_OVS_CMD = ("dnf", "remove", "-y", "-q", "NetworkManager-ovs")
DNF_INSTALL_NM_OVS_CMD = ("dnf", "install", "-y", "-q", "NetworkManager-ovs")
DNF_INSTALL_NM_OVS_CMD = (
"dnf",
"install",
"-y",
"--cacheonly",
"NetworkManager-ovs",
)
SYSTEMCTL_RESTART_NM_CMD = ("systemctl", "restart", "NetworkManager")