Skip to content

Commit

Permalink
gs-self-test: adapt to gs_plugin_add_search changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloyoyoista authored and Cogitri committed Jan 3, 2023
1 parent cc13f58 commit 835ecb8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tests/gs-self-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,16 @@ gs_plugins_apk_app_install_remove (GsPluginLoader *plugin_loader)
g_autoptr (GsPluginJob) plugin_job = NULL;
g_autoptr (GsApp) app = NULL;
g_autoptr (GsPlugin) plugin = NULL;
g_autoptr (GsAppQuery) query = NULL;
const char *keywords[2] = { "apk-test", NULL };
gboolean rc;

// Search for a non-installed app
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH,
"search", "apk-test",
// We force refine to take ownership
"refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION,
NULL);
query = gs_app_query_new ("keywords", keywords,
// We force refine to take ownership
"refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION,
NULL);
plugin_job = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_NONE);
app = gs_plugin_loader_job_process_app (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
Expand Down Expand Up @@ -223,14 +225,16 @@ gs_plugins_apk_refine_app_missing_source (GsPluginLoader *plugin_loader)
g_autoptr (GError) error = NULL;
g_autoptr (GsPluginJob) plugin_job = NULL;
g_autoptr (GsApp) app = NULL;
g_autoptr (GsAppQuery) query = NULL;
const char *keywords[2] = { "no-source", NULL };
g_autoptr (GsPlugin) plugin = NULL;

// Search for a non-installed app. Use a refine flag not being used
// to force the run of the refine, but only fix the missing source
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH,
"search", "no-source",
"refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_KUDOS,
NULL);
query = gs_app_query_new ("keywords", keywords,
"refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_KUDOS,
NULL);
plugin_job = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_NONE);
app = gs_plugin_loader_job_process_app (plugin_loader, plugin_job, NULL, &error);
gs_test_flush_main_context ();
g_assert_no_error (error);
Expand Down

0 comments on commit 835ecb8

Please sign in to comment.