migrate -> run

This commit is contained in:
Alexandre Aubin 2019-11-20 15:43:09 +01:00
parent ff57788601
commit 02d00eece0
3 changed files with 3 additions and 3 deletions

View file

@ -2637,7 +2637,7 @@ def _read_apps_catalog_list():
if os.path.exists('/etc/yunohost/appslists.json'): if os.path.exists('/etc/yunohost/appslists.json'):
from yunohost.tools import _get_migration_by_name from yunohost.tools import _get_migration_by_name
migration = _get_migration_by_name("futureproof_apps_catalog_system") migration = _get_migration_by_name("futureproof_apps_catalog_system")
migration.migrate() migration.run()
try: try:
list_ = read_yaml(APPS_CATALOG_CONF) list_ = read_yaml(APPS_CATALOG_CONF)

View file

@ -21,7 +21,7 @@ class MyMigration(Migration):
"Migrate to the new future-proof apps catalog system" "Migrate to the new future-proof apps catalog system"
def migrate(self): def run(self):
if not os.path.exists(LEGACY_APPS_CATALOG_CONF): if not os.path.exists(LEGACY_APPS_CATALOG_CONF):
logger.info("No need to do anything") logger.info("No need to do anything")

View file

@ -318,7 +318,7 @@ def test_apps_catalog_migrate_legacy_explicitly():
# Mock the server response with a dummy apps catalog # Mock the server response with a dummy apps catalog
m.register_uri("GET", APPS_CATALOG_DEFAULT_URL_FULL, text=DUMMY_APP_CATALOG) m.register_uri("GET", APPS_CATALOG_DEFAULT_URL_FULL, text=DUMMY_APP_CATALOG)
migration.migrate() migration.run()
# Old conf shouldnt be there anymore (got renamed to .old) # Old conf shouldnt be there anymore (got renamed to .old)
assert not os.path.exists("/etc/yunohost/appslists.json") assert not os.path.exists("/etc/yunohost/appslists.json")