Rename this state transition handler.

This commit is contained in:
Ralph Bean
2016-07-15 14:05:37 -04:00
parent 44e35c3a09
commit fe863aa33a
2 changed files with 7 additions and 5 deletions

View File

@@ -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)

View File

@@ -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')