[gnome-software/wip/async-plugin-repo-funcs: 40/60] flatpak: Replace GS_PLUGIN_ACTION_INSTALL_REPO job with manage repository job in tests
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/async-plugin-repo-funcs: 40/60] flatpak: Replace GS_PLUGIN_ACTION_INSTALL_REPO job with manage repository job in tests
- Date: Mon, 27 Jun 2022 12:12:57 +0000 (UTC)
commit 85d31f360e942ecac36104aea13a4942c6a05e01
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 | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)
---
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index d414a6673..621806d96 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -166,9 +166,7 @@ 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_FLAGS_INSTALL);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
@@ -320,9 +318,7 @@ 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_FLAGS_INSTALL);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
@@ -585,9 +581,7 @@ 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_FLAGS_INSTALL);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
@@ -871,9 +865,7 @@ 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_FLAGS_INSTALL);;
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
@@ -1015,9 +1007,7 @@ 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_FLAGS_INSTALL);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
@@ -1112,9 +1102,7 @@ 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_FLAGS_INSTALL);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_no_error (error);
g_assert_true (ret);
@@ -1427,9 +1415,7 @@ 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_FLAGS_INSTALL);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
@@ -1678,9 +1664,7 @@ 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_FLAGS_INSTALL);
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]