[gnome-software: 19/20] tests: Remove the test for invalid (too short) searches
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 19/20] tests: Remove the test for invalid (too short) searches
- Date: Mon, 11 Jul 2022 08:41:48 +0000 (UTC)
commit b58f08019cd26ea037e8790c78c0e2d531501b1e
Author: Philip Withnall <pwithnall endlessos org>
Date: Tue Jul 5 16:04:02 2022 +0100
tests: Remove the test for invalid (too short) searches
They are actually supported, and there seems to be little need to not
support them.
The UI already pauses executing a search until a few characters have
been entered anyway.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
plugins/dummy/gs-self-test.c | 24 ------------------------
1 file changed, 24 deletions(-)
---
diff --git a/plugins/dummy/gs-self-test.c b/plugins/dummy/gs-self-test.c
index 5f025a195..f07b57f90 100644
--- a/plugins/dummy/gs-self-test.c
+++ b/plugins/dummy/gs-self-test.c
@@ -492,27 +492,6 @@ gs_plugins_dummy_search_alternate_func (GsPluginLoader *plugin_loader)
g_assert_cmpint (gs_app_get_kind (app_tmp), ==, AS_COMPONENT_KIND_DESKTOP_APP);
}
-static void
-gs_plugins_dummy_search_invalid_func (GsPluginLoader *plugin_loader)
-{
- g_autoptr(GError) error = NULL;
- g_autoptr(GsAppList) list = NULL;
- g_autoptr(GsPluginJob) plugin_job = NULL;
- g_autoptr(GsAppQuery) query = NULL;
- const gchar *keywords[2] = { NULL, };
-
- /* get search result based on addon keyword */
- keywords[0] = "X";
- query = gs_app_query_new ("keywords", keywords,
- "dedupe-flags", GS_PLUGIN_JOB_DEDUPE_FLAGS_DEFAULT,
- 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_error (error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_NOT_SUPPORTED);
- g_assert (list == NULL);
-}
-
static void
gs_plugins_dummy_url_to_app_func (GsPluginLoader *plugin_loader)
{
@@ -945,9 +924,6 @@ main (int argc, char **argv)
g_test_add_data_func ("/gnome-software/plugins/dummy/search-alternate",
plugin_loader,
(GTestDataFunc) gs_plugins_dummy_search_alternate_func);
- g_test_add_data_func ("/gnome-software/plugins/dummy/search{invalid}",
- plugin_loader,
- (GTestDataFunc) gs_plugins_dummy_search_invalid_func);
g_test_add_data_func ("/gnome-software/plugins/dummy/url-to-app",
plugin_loader,
(GTestDataFunc) gs_plugins_dummy_url_to_app_func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]