YUM v3 is no longer developed, having been superseded by DNF for several years. With DNF now available as a usable package manager in Red Hat Enterprise Linux 7 through the Extras channel and SUSE Linux Enterprise 15 through PackageHub, there is no reason for keeping support for YUM v3 around. We are keeping support for requesting YUM because in Red Hat Enterprise Linux 7, DNF is referred to as "YUM v4", and it is simply referred to as "YUM" in Red Hat Enterprise Linux 8. To avoid confusion from people, we're just going to leave it in place as an alias to the DNF package manager. As for why this is happening now, Fedora is retiring YUM v3 in Fedora 31, so we might as well get it over with and cut over now. Reference: https://fedoraproject.org/wiki/Changes/Retire_YUM_3
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from mock import patch
|
|
|
|
import mock
|
|
|
|
from .test_helper import raises
|
|
|
|
from kiwi.repository import Repository
|
|
|
|
from kiwi.exceptions import KiwiRepositorySetupError
|
|
|
|
|
|
class TestRepository(object):
|
|
@raises(KiwiRepositorySetupError)
|
|
def test_repository_manager_not_implemented(self):
|
|
Repository('root_bind', 'ms-manager')
|
|
|
|
@patch('kiwi.repository.RepositoryZypper')
|
|
def test_repository_zypper(self, mock_manager):
|
|
root_bind = mock.Mock()
|
|
Repository(root_bind, 'zypper')
|
|
mock_manager.assert_called_once_with(root_bind, None)
|
|
|
|
@patch('kiwi.repository.RepositoryDnf')
|
|
def test_repository_dnf(self, mock_manager):
|
|
root_bind = mock.Mock()
|
|
Repository(root_bind, 'dnf')
|
|
mock_manager.assert_called_once_with(root_bind, None)
|
|
|
|
@patch('kiwi.repository.RepositoryDnf')
|
|
def test_repository_yum(self, mock_manager):
|
|
root_bind = mock.Mock()
|
|
Repository(root_bind, 'yum')
|
|
mock_manager.assert_called_once_with(root_bind, None)
|
|
|
|
@patch('kiwi.repository.RepositoryApt')
|
|
def test_repository_apt(self, mock_manager):
|
|
root_bind = mock.Mock()
|
|
Repository(root_bind, 'apt-get')
|
|
mock_manager.assert_called_once_with(root_bind, None)
|