[gnome-software: 7/11] tests: Port ACTION_GET_ALTERNATES to use GsPluginJobListApps
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 7/11] tests: Port ACTION_GET_ALTERNATES to use GsPluginJobListApps
- Date: Mon, 11 Jul 2022 11:57:03 +0000 (UTC)
commit aee3d37a289f99daa7aeed8248aed10e96ef2ea5
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Jul 6 15:24:03 2022 +0100
tests: Port ACTION_GET_ALTERNATES to use GsPluginJobListApps
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1472
plugins/dummy/gs-self-test.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index f07b57f90..c0575ad17 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -469,14 +469,17 @@ gs_plugins_dummy_search_alternate_func (GsPluginLoader *plugin_loader)
g_autoptr(GError) error = NULL;
g_autoptr(GsAppList) list = NULL;
g_autoptr(GsApp) app = NULL;
+ g_autoptr(GsAppQuery) query = NULL;
g_autoptr(GsPluginJob) plugin_job = NULL;
/* get search result based on addon keyword */
app = gs_app_new ("zeus.desktop");
- plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_GET_ALTERNATES,
- "app", app,
- "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
- NULL);
+ query = gs_app_query_new ("alternate-of", app,
+ "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON,
+ "dedupe-flags", GS_PLUGIN_JOB_DEDUPE_FLAGS_DEFAULT,
+ "sort-func", gs_utils_app_sort_priority,
+ NULL);
+ plugin_job = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_NONE);
list = gs_plugin_loader_job_process (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]