[gnome-software/wip/async-plugin-repo-funcs: 13/29] flatpak: Replace GS_PLUGIN_ACTION_REMOVE_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: 13/29] flatpak: Replace GS_PLUGIN_ACTION_REMOVE_REPO job with manage repository job in tests
- Date: Tue, 28 Jun 2022 15:44:23 +0000 (UTC)
commit fe3c4efea20e772b7ddd4ef2213ede8fa7de9422
Author: Milan Crha <mcrha redhat com>
Date: Tue Jun 14 15:31:43 2022 +0200
flatpak: Replace GS_PLUGIN_ACTION_REMOVE_REPO job with manage repository job in tests
plugins/flatpak/gs-self-test.c | 66 +++++++++++++++++++++---------------------
1 file changed, 33 insertions(+), 33 deletions(-)
---
diff --git a/plugins/flatpak/gs-self-test.c b/plugins/flatpak/gs-self-test.c
index 632d25371..c02f7337b 100644
--- a/plugins/flatpak/gs-self-test.c
+++ b/plugins/flatpak/gs-self-test.c
@@ -229,9 +229,9 @@ gs_plugins_flatpak_repo_func (GsPluginLoader *plugin_loader)
/* remove it */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -512,9 +512,9 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
/* remove the remote (fail, as the runtime is still installed) */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ GS_PLUGIN_MANAGE_REPOSITORY_FLAGS_NONE);
ret = gs_plugin_loader_job_action (plugin_loader, plugin_job, NULL, &error);
g_assert_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_FAILED);
g_assert_true (!ret);
@@ -534,9 +534,9 @@ gs_plugins_flatpak_app_with_runtime_func (GsPluginLoader *plugin_loader)
/* remove the remote */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -633,9 +633,9 @@ gs_plugins_flatpak_app_missing_runtime_func (GsPluginLoader *plugin_loader)
/* remove the remote */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -808,9 +808,9 @@ gs_plugins_flatpak_runtime_repo_func (GsPluginLoader *plugin_loader)
g_assert_true (app_source != NULL);
g_assert_cmpstr (gs_app_get_unique_id (app_source), ==, "user/flatpak/*/test/*");
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -969,9 +969,9 @@ gs_plugins_flatpak_runtime_repo_redundant_func (GsPluginLoader *plugin_loader)
g_assert_true (app_source != NULL);
g_assert_cmpstr (gs_app_get_unique_id (app_source), ==, "user/flatpak/*/test/*");
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -1062,9 +1062,9 @@ gs_plugins_flatpak_broken_remote_func (GsPluginLoader *plugin_loader)
/* remove source */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -1301,9 +1301,9 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
/* remove source */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -1316,9 +1316,9 @@ flatpak_bundle_or_ref_helper (GsPluginLoader *plugin_loader,
gs_app_set_management_plugin (runtime_source, plugin);
gs_app_set_state (runtime_source, GS_APP_STATE_INSTALLED);
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", runtime_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (runtime_source,
+
GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -1607,9 +1607,9 @@ gs_plugins_flatpak_app_update_func (GsPluginLoader *plugin_loader)
/* remove the remote */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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);
@@ -1869,9 +1869,9 @@ gs_plugins_flatpak_runtime_extension_func (GsPluginLoader *plugin_loader)
/* remove the remote */
g_object_unref (plugin_job);
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_REMOVE_REPO,
- "app", app_source,
- NULL);
+ plugin_job = gs_plugin_job_manage_repository_new (app_source,
+ GS_PLUGIN_MANAGE_REPOSITORY_OPERATION_REMOVE,
+ 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]