repoclosure: Remove useless wrapper class

We already get namespacing from being in a separate module.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-01-26 08:59:47 +01:00
parent 5693bf9925
commit 7a8fa87172
3 changed files with 31 additions and 46 deletions

View File

@ -18,7 +18,7 @@ import os
from kobo.shortcuts import run
from pungi.wrappers.repoclosure import RepoclosureWrapper
from pungi.wrappers import repoclosure
from pungi.arch import get_valid_arches
from pungi.phases.base import PhaseBase
from pungi.phases.gather import get_lookaside_repos
@ -34,8 +34,6 @@ class TestPhase(PhaseBase):
def run_repoclosure(compose):
repoclosure = RepoclosureWrapper()
# TODO: Special handling for src packages (use repoclosure param builddeps)
msg = "Running repoclosure"

View File

@ -19,12 +19,7 @@ import os
from kobo.shortcuts import force_list
class RepoclosureWrapper(object):
def __init__(self):
self.actual_id = 0
def get_repoclosure_cmd(self, arch=None, builddeps=False,
def get_repoclosure_cmd(arch=None, builddeps=False,
repos=None, lookaside=None):
cmd = ["/usr/bin/repoclosure"]

View File

@ -10,25 +10,19 @@ import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from pungi.wrappers import repoclosure
from pungi.wrappers import repoclosure as rc
class RepoclosureWrapperTestCase(unittest.TestCase):
def test_minimal_command(self):
rc = repoclosure.RepoclosureWrapper()
self.assertEqual(rc.get_repoclosure_cmd(),
['/usr/bin/repoclosure'])
def test_multiple_arches(self):
rc = repoclosure.RepoclosureWrapper()
self.assertEqual(rc.get_repoclosure_cmd(arch=['x86_64', 'ppc64']),
['/usr/bin/repoclosure', '--arch=x86_64', '--arch=ppc64'])
def test_full_command(self):
rc = repoclosure.RepoclosureWrapper()
repos = {'my-repo': '/mnt/koji/repo'}
lookaside = {'fedora': 'http://kojipkgs.fp.o/repo'}
@ -45,7 +39,6 @@ class RepoclosureWrapperTestCase(unittest.TestCase):
'--lookaside=fedora'])
def test_expand_repo(self):
rc = repoclosure.RepoclosureWrapper()
repos = {
'local': '/mnt/koji/repo',
'remote': 'http://kojipkgs.fp.o/repo',
@ -60,7 +53,6 @@ class RepoclosureWrapperTestCase(unittest.TestCase):
'--repoid=remote'])
def test_expand_lookaside(self):
rc = repoclosure.RepoclosureWrapper()
repos = {
'local': '/mnt/koji/repo',
'remote': 'http://kojipkgs.fp.o/repo',