idempotent KojiBuilder implementation of rida/builder.py

- Allows to call build() and connect() multiple times. This needs to be
  followed by allowing to resubmit module build tasks in REST.
- rename buildroot_add_repo() to buildroot_add_repos() (input data is artifacts)

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
Lubos Kocman
2016-08-12 20:44:11 +02:00
committed by Nils Philippsen
parent dd0b60dcdd
commit 68e32ee8c7
6 changed files with 156 additions and 93 deletions

View File

@@ -52,9 +52,9 @@ class TestRepoDone(unittest.TestCase):
@mock.patch('rida.builder.KojiModuleBuilder.buildroot_ready')
@mock.patch('rida.builder.KojiModuleBuilder.get_session_from_config')
@mock.patch('rida.builder.KojiModuleBuilder.build')
@mock.patch('rida.builder.KojiModuleBuilder.buildroot_resume')
@mock.patch('rida.builder.KojiModuleBuilder.buildroot_connect')
@mock.patch('rida.models.ModuleBuild.from_repo_done_event')
def test_a_single_match(self, from_repo_done_event, resume, build_fn, config, ready):
def test_a_single_match(self, from_repo_done_event, build_fn, config, ready):
""" Test that when a repo msg hits us and we have a single match.
"""
config.return_value = mock.Mock(), "development"