def release(path, repository): """ Create a new release upgrade recipe (for developers). """ from invenio.modules.upgrader.commands import \ cmd_upgrade_create_release_recipe cmd_upgrade_create_release_recipe(path, repository)
def test_create_release(self): """ Test creation of upgrades """ from invenio.modules.upgrader.engine import InvenioUpgrader from invenio.modules.upgrader.commands import \ cmd_upgrade_create_standard_recipe, \ cmd_upgrade_create_release_recipe engine = InvenioUpgrader(packages=[ 'invenio_upgrader_test', 'invenio_upgrader_test.mymod']) cmd_upgrade_create_standard_recipe( 'invenio_upgrader_test', depends_on=[] ) cmd_upgrade_create_standard_recipe( 'invenio_upgrader_test.mymod', depends_on=[] ) cmd_upgrade_create_release_recipe( 'invenio_upgrader_test', repository='invenio', upgrader=engine ) # Find all endpoints in all repositories upgrades = engine.get_upgrades(remove_applied=False) for u in upgrades: if u['id'] == 'invenio_release_x_y_z': assert len(u['depends_on']) == 2
def test_create_release(self): """ Test creation of upgrades """ from invenio.modules.upgrader.engine import InvenioUpgrader from invenio.modules.upgrader.commands import \ cmd_upgrade_create_standard_recipe, \ cmd_upgrade_create_release_recipe engine = InvenioUpgrader( packages=['invenio_upgrader_test', 'invenio_upgrader_test.mymod']) cmd_upgrade_create_standard_recipe('invenio_upgrader_test', depends_on=[]) cmd_upgrade_create_standard_recipe('invenio_upgrader_test.mymod', depends_on=[]) cmd_upgrade_create_release_recipe('invenio_upgrader_test', repository='invenio', upgrader=engine) # Find all endpoints in all repositories upgrades = engine.get_upgrades(remove_applied=False) for u in upgrades: if u['id'] == 'invenio_release_x_y_z': assert len(u['depends_on']) == 2