Merge #413 Fix #409 - Remove koji_tag_inherit_from and whitelist all the components we are going to build instead.

This commit is contained in:
Jan Kaluža
2017-03-14 16:22:38 +00:00
8 changed files with 44 additions and 30 deletions

View File

@@ -93,7 +93,7 @@ class TestModuleBuilder(GenericBuilder):
on_tag_artifacts_cb = None
@module_build_service.utils.validate_koji_tag('tag_name')
def __init__(self, owner, module, config, tag_name):
def __init__(self, owner, module, config, tag_name, components):
self.module_str = module
self.tag_name = tag_name
self.config = config

View File

@@ -65,7 +65,8 @@ class TestKojiBuilder(unittest.TestCase):
fake_kmb = FakeKojiModuleBuilder(owner='Moe Szyslak',
module='nginx',
config=conf,
tag_name='module-nginx-1.2')
tag_name='module-nginx-1.2',
components=[])
fake_kmb.module_target = {'build_tag': 'module-fake_tag'}
with self.assertRaises(IOError):
@@ -88,7 +89,8 @@ class TestGetKojiClientSession(unittest.TestCase):
KojiModuleBuilder(owner=self.owner,
module=self.module,
config=self.config,
tag_name=self.tag_name)
tag_name=self.tag_name,
components=[])
args, kwargs = mocked_krb_login.call_args
self.assertTrue(set([('proxyuser', self.owner)]).issubset(set(kwargs.items())))

View File

@@ -70,6 +70,7 @@ class TestModuleWait(unittest.TestCase):
mmd.loads(f)
mocked_module_build.mmd.return_value = mmd
mocked_module_build.component_builds = []
from_module_event.return_value = mocked_module_build