[gnome-software/wip/async-plugin-repo-funcs: 9/29] flatpak: Replace GS_PLUGIN_ACTION_INSTALL_REPO job with manage repository job in tests




commit 3932bc89fec9ba723b0a5e1b0e437898c8b0eef3
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 14 12:30:52 2022 +0200

    flatpak: Replace GS_PLUGIN_ACTION_INSTALL_REPO job with manage repository job in tests

 plugins/flatpak/gs-self-test.c | 48 +++++++++++++++++++++---------------------
 1 file changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index d414a6673..632d25371 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -166,9 +166,9 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
 
        /* now install the remote */
        g_object_unref (plugin_job);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);
@@ -320,9 +320,9 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
        gs_app_set_management_plugin (app_source, plugin);
        gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_source,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_source,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);
@@ -585,9 +585,9 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
        gs_app_set_management_plugin (app_source, plugin);
        gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_source,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_source,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);
@@ -871,9 +871,9 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
 
        /* install the source manually */
        g_object_unref (plugin_job);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_src,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_src,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);
@@ -1015,9 +1015,9 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
        gs_app_set_management_plugin (app_source, plugin);
        gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, "file:///wont/work");
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_source,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_source,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
@@ -1112,9 +1112,9 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
        gs_app_set_management_plugin (app_source, plugin);
        gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        gs_flatpak_app_set_repo_url (app_source, testdir_repourl);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_source,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_source,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        g_assert_no_error (error);
        g_assert_true (ret);
@@ -1427,9 +1427,9 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
        gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        repo_url = g_strdup_printf ("file://%s", repo_path);
        gs_flatpak_app_set_repo_url (app_source, repo_url);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_source,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_source,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);
@@ -1678,9 +1678,9 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
        gs_app_set_state (app_source, GS_APP_STATE_AVAILABLE);
        repo_url = g_strdup_printf ("file://%s", repo_path);
        gs_flatpak_app_set_repo_url (app_source, repo_url);
-       plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_INSTALL_REPO,
-                                        "app", app_source,
-                                        NULL);
+       plugin_job = gs_plugin_job_manage_repository_new (app_source,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_INSTALL,
+                                                         GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
        ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
        gs_test_flush_main_context ();
        g_assert_no_error (error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]