mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 11:48:33 +08:00
Rename this state transition handler.
This commit is contained in:
@@ -32,12 +32,14 @@ import koji
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def init(config, session, msg):
|
||||
""" Called whenever a module enters the 'init' state.
|
||||
def wait(config, session, msg):
|
||||
""" Called whenever a module enters the 'wait' state.
|
||||
|
||||
We usually transition to this state when the modulebuild is first requested.
|
||||
We transition to this state shortly after a modulebuild is first requested.
|
||||
|
||||
All we do here is request preparation of the buildroot.
|
||||
The kicking off of individual component builds is handled elsewhere,
|
||||
in rida.schedulers.handlers.repos.
|
||||
"""
|
||||
build = rida.database.ModuleBuild.from_fedmsg(session, msg)
|
||||
pdc_session = rida.pdc.get_pdc_client_session(config)
|
||||
|
||||
@@ -26,12 +26,12 @@ import mock
|
||||
import rida.scheduler.handlers.modules
|
||||
|
||||
|
||||
class TestInit(unittest.TestCase):
|
||||
class TestWait(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.config = mock.Mock()
|
||||
self.session = mock.Mock()
|
||||
self.fn = rida.scheduler.handlers.modules.init
|
||||
self.fn = rida.scheduler.handlers.modules.wait
|
||||
|
||||
@mock.patch('rida.builder.KojiModuleBuilder')
|
||||
@mock.patch('rida.database.ModuleBuild.from_fedmsg')
|
||||
Reference in New Issue
Block a user